Find the name of the folder in full

Hello

I need assistance to find the indesign files in the folder (s) path and get alert if they match the name of the file.

While the major part of the name of the folder is commong (highlighted in blue) and the name of the folder only one (highlighted in red) will vary.

EG.,.

name = Folder("__/Users/TTT/Desktop/PRODUCTION/Tag_London/B/BB/BEAS/EMEA/CREATIVE_PACKSHOT/___909009____/DOCUMENT/__").getFiles ("*.indd");

nameT = Folder("/CREATIVE/CHST/WATCHED_FOLDER/BTS/INDesign_IN/").getFiles("*.indd");

for (i = 0; i < name.length; i ++) {}

for (j = 0; j < nameT.length; j ++) {}

If (. parent.parent.parent.parent.parent.parent.name name [i] == 'BB')

If (name [i]. Name.Split(".") [0] == nameT [j].name.split (".") [0]) {

Alert (name [i].parent.parent.parent.name)

}

on the other

Alert ('no')

}}

The final destination DOCUMENT folder will be current.

How can I assign / [0-9] + '_' / instead of folder 909009_

i.e.

name = folder ("/ users/TTT/Desktop/PRODUCTION/Tag_London/B/BB/BEA/EMEA/CREATIVE_PACKSHOT /[0-9] +[0-9] +[0-9] +[0-9] +[0-9] +[0-9] +"_"DOCUMENT/").getFiles("*.indd");

Thank you very much for the support.


Hello

I don't think you can set a reference file with dynamic URLS (regexp). I think that you can work in two steps:

(1) the static parent file reference

var fo = folder ("/ users/TTT/Desktop/PRODUCTION/Tag_London/B/BB/BEA/EMEA/CREAT IVE_PACKSHOT /");

(2) get all the 'files' and filter the folders above files.

var filterFunction = function(file)
                              {

                                        return (file instanceof Folder) && /[0-9]+"_"/.test ( file.name ) && Folder ( file+"/DOCUMENT/").exists;
                              }

var fos = fo.getFiles( filterFunction );

(3) once you have all your files, fill an internal table with all indd files

var indds = [];
var n = fos.length;
var inddFilterFunction = function(file){
     return (file instanceof File) && /\.indd$/.test ( file.name);
}
while(n--) {
 indds.concat ( Folder(fos[n]+"/DOCUMENT/").getFiles(inddFilterFunction) );
}

(4) do what you have to do with your table of files

HTH

Loïc

Tags: InDesign

Similar Questions

  • When I get a bookmark and you think how can I find the folder it is in?

    I click Favorites, and then click Show all bookmarks and use the favorite search box at the top right. I type in the name of the
    I'm looking for bookmark and considers appropriate. How can I find the folder it is in?

    Without an extension, a possible way to proceed is to open the bookmark in a tab (possibly offline), then click the star on the Navigation toolbar to open the dialog box "Edit this bookmark" that shows the folder.

  • I have a new pc and save the bookmarks. Where can I find the folder with bookmarks?

    I have a new pc and I want to save the old bookmarks. Where can I find the folder with bookmarks?

    See this:
    http://support.Mozilla.com/en-us/KB/recovering+important+data+from+an+old+profile

  • How do I save pictures to my iMac on external HD? (where can I find the folder of photos itself?)

    I have an IMac with OS El Capitan 10.11.2 & want to save the files & photos on an external HD.  I can drag 7 drop files to HD, but where do I find the folder of photos to do what I can't do drag & drop those.  Grateful for the help here.

    Thks

    Dorothy

    Drag, or export them to Magnatune or choose homepage from the Finder Go menu, double click on photos and drag the library as a unit of a volume format Mac OS extended.

    (138174)

  • Find the folder of the Application on Labview

    Hello

    Is it possible to dynamically find the folder 'Application' on LabVIEW?

    For example, if I have windows on another language, the application folder is not the typical:

    C:\Documents and Settings\All Users\Application Data\

    I already tried to use the property node "Application App.Default" but I can't use this do get a path.

    Thank you

    That returns only the folder where VI is located, not the user of Windows 'Application Data' folder, which is a ' special '.

    To get the "Application" folder you can user .NET or the Windows API. For .NET, you can use the Environment.GetFolderPath method. For the Windows API, you can use SHGetFolderPath.

    Here's the method .NET:

  • cannot find the folder "program data".

    original title: New Data - Program for Windows 7

    I just bought a new computer with windows 7.  I am trying to install programs, for example, installing a program to C:\program data\Quantum.  I go to 'my computer' and can not find the folder "program data".  Is it possible that windows is hide it?

    Sandy

    Hi Sandy

    The program data file replaced the all users in previous versions of Windows.

    Open Windows Explorer. Click on organize / folders and Search Options / View tab.

    Select the option Show hidden files, folders and drives, and then click apply/OK.

    Navigate to C:\Users. In this folder, you will see a folder named all users with a shortcut arrow or the layering of padlock. It is a symlink pointing to the ProgramData folder. Right-click on the folder and select properties to see this data.

    Your programs are not currently installed just for the ProgramData folder. This folder is used to allow any user (for all users) access to an installed program that allows any user to operate this program.

    Many times, when you install a program, you will see an option to install the program for the current user only, or to install for all users.

    Another way, you can see it is to click on the Start button, right-click on all programs, and select open all users. This will open Windows Explorer to the

    C:\ProgramData\Microsoft\Windows\Start Menu folder.

    Let us know if you have any other questions.

    Concerning

  • LR5-can not find the folder "my pictures."

    I got LR for several years now and am on LR5. I did have problems until recently.  My LR can NOT find the folder "my pictures."  It will not!  I tried to watch all files with no luck.  I have spent literal hours online and no luck.  I'm desperate.  Help, please.  I tried everything and no luck!

    Beth

    Where the reason that Lightroom can't see it!

    File Explorer has an option for "Show Hidden items" If you can find it in the menu of the file Explorer.

    Windows-10 now on the Ribbon of "display" -.

  • Captivate Gallery in Windows Explorer. Find the folder of sound effects

    How can you do that open the Captivate Gallery in Windows Explorer. Find the folder of sound effects? I don't know if it's the cached file or what?

    C:/Program Files / Adobe / Adobe Captivate (your version) / Gallery/sound effects

  • Can not find the folder AppData under C:/Users / "Profile name".

    Original title: folder missing in C:/Users / "Profile name".

    How can I find the files under C:/Users /... the only files I see are the following: Contacts; Desktop computer; Documents / downloads. Favorites; Links; Music; Photos; Parts saved; Seraches; Videos.  I don't see AppData and AppData folders

    Thank you!

    Hello

    1. what operating system is installed on your system?

    2. were you able to see it sooner?

    3. are you referring to the AppData folder?

    I suggest you view hidden files and folders option and check if it helps.

    Show hidden files

    http://Windows.Microsoft.com/en-us/Windows7/show-hidden-files  (Applicable to Windows Vista and Windows 7)

    http://www.Microsoft.com/resources/documentation/Windows/XP/all/proddocs/en-US/win_fcab_show_file_extensions.mspx?mfr=true (Applicable to Windows XP)

    Let us know if it helps!

  • can not find the folder under brushes in the finder

    Hi everyone im trying to clean my presets in Photoshop CS5, I recently saved the brushes that I created in photoshop and I clicked on the new folder button at the bottom to create a new folder named "My brushes" and I saved the brushes, which was ideal because he has created a line of separation between my brushes and photoshops built in brushes to keep things neat and make searching for my brushes less complicated, because before he confused them in alphabetical order with the brushes included in the drop down menu in the control panel shapes.

    But now, I can not find this folder "My brushes" or its contents any where except in photoshop, so I can't rename the folder, delete it or backup my brushes someone know where photoshop is hiding? any help greatly appreciated

    If the library folder in your user name (the' home ', no library folder on the top level of your system disk) contains any Application Support/Adobe/Adobe Photoshop CS5/Presets/brushes?

  • Can not find the folder in which a bookmark is in

    Before coming here, I read the instructions on the help page, http://support.mozilla.com/en-US/kb/How%20to%20find%20which%20folder%20a..., under the subheading to find the bookmark folder , but there is a problem. When I do as explained and click on the star on the address field, the folder of bookmarks displayed is always Unsorted Bookmarks.

    I have a lot of favorites in many folders and subfolders, and I don't always know their location, so this tip is very useful for me. I placed the Firefox profile on anther, not the same with the OS disk to avoid losing any operating system failure, but I do not think that it will cause a problem because otherwise Firefox works as expected.

    Is this a problem? How can I fix it please?

    See also these extensions:

  • need help to find the folder of firefox on iMac

    New to this bear so please with me.  Here's the situation.

    I was getting malware and understand how to get rid of it, ok so far.

    Then I noticed that my sites kept has the question 'connection' in the top bar.

    I was trying to figure this out when I followed some information 'to a point' - big flaw here.

    I caught and then drag to a folder that was causing my problem.  It was not the case.

    I think it was my firefox profile folder, but the folder is not sure - klzqb90r.default.

    Put in the trash.  Oops again.

    Tired opening Firefox - come with LACK of PROFILE error message - your firefox profile cannot be loaded.  It may be missing or inaccessible.

    I think I got it but now, just do not know where to put it.

    So, read more.  Search for the library and the firefox folder, is not there.

    Now I am panicking because I can't open firefox to do 'something' to him to try to find my profile / refresh etc.

    Can someone please help?  I think I need to find the correct folder that belongs to my folder by default, BUT am not a guru of computing here... some understanding of computers.

    Thank you.

    In the menu go to the Finder, select "go to folder...". "(Shift + command + G)

    Type or paste in

    ~/Library/application support/Firefox/Profiles

    return.

  • Can not find the folder that contains the Media Gallery x 64 msi. Windows is 0.1µm trying to install it

    Windows is 0.1µm tent to install the Sony VAIO Media Gallery but hold always applicant find folder for Media Gallery x 64 msi installation package. Cannot find this package despite the computer search.

    Hi Francis,.

    I understand that, Sony VAIO media gallery cannot install asking to find folder containing the installation package for Media Gallery x 64 msi.

    I suggest you follow these methods and check.

    Method 1: Restart Let's Windows Installer service.

    a. press Windows key + R, type services.msc in the run prompt and press enter.

    b. transfer the Services window, find the Windows Installer and double-click it.

    c. click stop , then click Start.

    Method 2: We'll uninstall the current version of Media gallery installed.
    Refer to the following link suggestions.

    http://Windows.Microsoft.com/en-in/Windows7/uninstall-or-change-a-program

    Download and install the latest version from the following link and check.

    http://www.Sony-Asia.com/productcontent/348006/ProductCategory/it-personal-computer

    I hope that these methods will solve your problem. If the problem persists, answer here.

  • BlackBerry Smartphones Cant find the folder with pictures that I just moved him.

    I had a folder with pictures in it, and I had put the propertys records for hidden photos and the showd yet from the folder to the top but showd nothing in it. But now all gone records and I can't find anywhere.

    Hello kerrie_rogers,

    The folder may be hidden:

    • Click on the media.
    • Press the Menu key and click Explore.
    • Click on the media card.
    • Press the menu button and select Show Hidden
    • Click BlackBerry.
    • Click on the photos.
    • Hidden photos and folders displays dimmed. Highlight the hidden picture.
    • Press the Menu key, and then click Properties.
    • Clear the hidden check box, and then click Close.

    Thank you

  • Bridge says it can't find the folder of Photoshop CC 2015

    When I browse in Bridge and locate the image I want to double click on the image, says bridge that it cannot open because it cannot find the file Photoshop CC 2014. Yesterday, I installed Photoshop 2015 and had to remove the folder from 2014. How can I fix so that the Bridge opens Photoshop CC 2015

    Thank you

    Mike Waddell

    Hello Mike,.

    Please, go to Preferences (Ctrl/Cmd-K) and edit Photoshop CC 2015 file associations in the tab "file type Associations. Because you deleted the app folder rather than uninstall it, bridge is still watching for Photoshop CC 2014.

    I hope this helps...

    Vikram

Maybe you are looking for