Creating a folder structure to a defined location on your desktop of EI through the script?


I wrote a script that creates a structure of folders in my opinion of AE project but I would then be able to run another script (possibly related to a button on a GUI Panel) which allows me to define where I can create a folder structure that is similar to my desktop or set the folder.

Is there a way to do this?

Thank you!

Okay, I think I now have something that works. I tested it a little CC in 2014, but not him have really put it through the wringer. So use with CAUTION!

It may not look pretty, but it works. The only things to know are that there is not currently a special auditor to avoid problems with name for the OS folder. The other is that if a duplicate folder name appears within the same parentFolder (see crude example below), it will be simply not created in the installation of the OS program. This prevents overwriting of files without warning.

Example:

What is AE...

Folder 1

Folder 2

Folder 3

Folder 4

Folder 4    <-----Folder with="" a="" duplicate="">

Folder 5

Folder 4    <-----Folder with="" a="" duplicate="" name,="" but="" is="" unique="" to="" it's="">

What is created in the BONE...

Folder 1

Folder 2

Folder 3

Folder 4

Folder 5

Folder 4

Here is the code of function, just supply the type of an argument of an object file. This will be the new root folder to build your AE folder structure.

var b = Folder.selectDialog("Choose a source folder.");

if(b != null){
    aeFoldersToOSFolders(b);
}

function aeFoldersToOSFolders(newRoot){
    var proj, allItems, folderCollection, folderCollectionLen, curItem, val, win, userOS, slash, newCorePath, folderNames, folderAEPath, temp;
    win = $.os.indexOf("Windows");
    win != (-1) ? userOS = "PC" : userOS = "MAC";
    userOS == ("PC") ? slash = "\\" : slash = "/";
    function getItemParentPath(endItem, ary, slash){
          if(endItem == "undefined"){
              return ary;
          }else if(endItem.name == "Root"){
              if(ary.length > 0){
                    return ary.reverse().join(slash).toString();
              }else{
                    return null;
              }
          }else{
              ary.push(endItem.name);
              var newParent = endItem.parentFolder;
              return getItemParentPath(newParent, ary, slash);
          }
    }

    proj = app.project;
    allItems = proj.numItems;
    folderCollection = new Array();
    temp = new Array();
    newCorePath = decodeURI(newRoot).toString();
    for(var i=1; i<=allItems; i++){
          curItem = proj.item(i);
          if(curItem instanceof FolderItem){
              temp.length = 0;
              folderAEPath = getItemParentPath(curItem, temp, slash);
              if(folderAEPath != null){
                    folderCollection.push(newCorePath + slash + folderAEPath);
              }
          }
    }

    folderCollectionLen = folderCollection.length;
    if(folderCollectionLen > 0){
          for(var f=0; f 
         

Tags: After Effects

Similar Questions

  • Can we create a folder structure?

    When I transfer mp3 files to the element by plugging it into my computer, I have the following folder structure:
    Music
    Folder1
    Name1.MP3
    Name2.MP3
    ...
    Folder2
    Name1.MP3 (a different file than in Folder1!)
    Name2.MP3
    ...
         
    However when I try to read the files, I see only
    Music
    Albums
    Name1
    Name1
    Name2
    Name2
    In other words, mp3 files that I had separated in 2 different subfolders are all presented together.

    Is there a way to get the Clip to recognize the structure of folders when reading files that exist during their transfer?

    It's there, just click down to it.

    Album, artist, etc. are not records - they are lists collected since the mp3 files ID3 tags.

    However, if you scroll way in front of them with a single click to the top - or music - you will see your own structure of files and folders.

    Make sure that in settings/system/USB settings you have configured in MSC. That's why the Clip act as a standard Flash drive.

    MTP mode is designed to help sync Windows Media Player with the Clip and it can change your names of files for its own reasons indexing. Auto Detect will choose PSG if your computer's Windows Media Player, so it is best to leave it on MSC.

    Your computer can see only one mode at a time, so if you have transferred files through the PSG, go to PMT, remove and re - transfer via MSC.

  • I have FF7 and my history of location bar will not clear either through the menu controls the keyboard, HELP

    I tried to delete all the history of location bar using the tools, the menu clear history and selected all the boxes. I still had the URL of sites in my location bar history. I then tried using SHIFT/DELETE on each URL. The next time I go to location bar history that URLS are back.

    See;

    One possible cause is a problem with the places.sqlite file that stores the bookmarks and history.

  • I can't open a new tab to create a new window, I have to go to my desktop and click on the firefox icon to open more than 1 window, how do I fix?

    To be able to open say my gmail and facebook, I have to go to my office and Open firefox 2 times in order to run the two elements. Firefox won't let me open up a new tab, but if I click on a link in a window, I then opened a new tab will open. Its very strange, any advice?

    Uninstall the toolbar Ask and it should work again. There is a compatibility issue with the Ask and Firefox toolbar that prevents the opening of new tabs.

    There are a few places to check for the Ask toolbar:

  • I have iTunes for Windows 10.  iTunes will not play the music through my internal speakers when they are defined by default.  iTunes will play through the headset.  My speakers will play with other applications.  Why is this?

    I have iTunes on Windows 10.  iTunes does not recognize my internal speakers when other applications will recognize them.  I can use the helmet without a problem.  Why is this?

    If you go to iTunes/Edit/Preferences/reading and select 'Audio Direct' for 'use of Audio play '.  Then log off iTunes and back log and you should be able to hear through your headphones.  Good luck!

  • Folder structure of Smartphones from blackBerry for music in the storm

    Hello

    OK, this question is related to the functioning of the storm records. Specifically, on the SD in my Storm.

    I finally got a few songs on my Storm and they play very well. However... I don't like the way 'standard' storm affects up to my music files. Normally, I like to create/name my own files with associated music in each of them.

    I can open my Storm SD card or folders in Windows Explorer and change them around and rename and all that. I can also do it in the (Roxio) Media Manager. HOWEVER... once I've made these changes, name changes to folder/don't take place on the phone.

    The ideas people?

    Thanks for your help!

    avimia

    OK, I'm not an expert on such things, but have gone through a lot of the same pain.

    1 JSanders is correct, BB will organize and display music files based on data associated with files.  Your directory structure does not control that.  You don't need even a structure of directory on your SD card.

    2 Save. you the trouble and stop using Roxio, VCast or any other desktop as a means of file transfer application to and keeping them on your BB.  Use a music library of your choice - RealPlayer, Windows Media Player application, some - to organize your library Office in this folder structure you like.  Use this application in addition to set the file attributes you want to see reflected on the BB - that is to say in your kind of title, Album, say alternative Office library, no matter what.

    3. connect your BB to the office using mass storage Mode - if you don't know how to do this, there are other threads that address it, if I can explain it.  This essentially will allow to see and interact with the BB as if it were just another drive.  Open the two explorers windows containing the (office computer) source and destination locations of directories (BB SD card, L: drive on my machine), delete all music from your BB and start drag and drop your music as well as its directory structure of your hard drive on your SD card.

    4. to logout, BB will take a few seconds to minutes to read the files in his PB.  Once you could see things in the way that you expect.

    5. However, if not, or if there is always stray files not organized as expected, you can go to every file on your hard drive. Do a right click and properties; GoTo Summary tab and click on advanced if it is the first time, you've been there; directly replace the attributes of the file that are presented in the screen that ensued.  Click Ok.  Then repeat steps 3 and 4 above, or at least for files, you have edited this way.

    Let me know if this is not clear and if Yes if it works.

  • Cannot create a folder "new folder" file system 16389 error

    Please help me... with this problem. IAM are currently not in a position to able to create any folder or a file on CD

    SF

    You must remove the upper and lower registry filters.  The instructions are here

    http://www.TomsHardware.com/Forum/254601-45-file-system-error-16389

  • What is the reason to not create new folder in a disk?

    I use windows OS in my Laptop.When am trying to create a folder in one of the drives is showing an error related to IO operations and blue screen is coming and system get restarted while I was able to create a folder of other readers in my Disk.Can hard someone give me the reason to this?

     We need the logfile itself (called DMP file) because they contain the only record of the sequence of events that led to the accident, what drivers have been loaded, and what has been loaded.
    We prefer at least 2 DMP files to track trends and to confirm the cause.

    Please follow our instructions to find and download the files, we need to help you fix your computer. They can be found at here

    If you have any questions regarding the procedure, please ask


    If you use the blue screen view, which has crashed, or a similar application, don't.  They are wrong at least as often they are correct
  • How can I see my folder structure in the mode of development?

    In library mode, I can see my files. When I switch to the mode of development, I lose sight of my folder structure. I have only selections. When in library mode, the window displays the folders option. But the window menu does not have folders option.

    You can't see your files in Mode develop.

    In my opinion, the best solution is to press G to return in grid Mode, press D to return mode to develop. It is not heavy and works well.

  • Keep the folder structure for AVCHD (.mts) video

    Hi all

    Can someone confirm if or not the PP CS4 and AE CS4 requires the AVCHD folder structure to be left in tact?

    I just found this http://blogs.Adobe.com/davtechtable/2008/09/intro_to_cs4_and_new_avchd_edi.html

    Who says...

    ... Make sure you leave the structure of folders. Drag it to the new folder as an exact copy. This will ensure that you will have everything you need. Importer for PremierePro (also used by AfterEffects & still) uses folders and files to help identify the parameters and types of files without tape.

    ... so clearly, it is better to do, but it is actually necessary?

    I have not bought the CS 4 software yet, but I intend to, however, this can be a problem, as I have more than 6 months with a value of sequences, most without the folder structure. It was too embarrassing trying to maintain and also the files in an organized way. I tried various video editing software demonstrations, and all those I tried (including the Premiere Elements) worked fine with just the files .mts, without the extra stuff.

    I also used AE and PP trial versions, but these do not seem to support .mts at all. After reading the various threads on the topic but, I concluded that it was just a missing feature in trial versions.

    Thank you very much

    Eugene

    What I do (with XDCAM-EX images) is a structure of directories like this:

    Customer A / B of the project / Stick 1 /BPAV

    Customer A / B of the project / Stick 2 /BPAV

    ...

    ...

    Customer B / project / Stick 1 /BPAV

    ...

    etc.

  • For 12.3.2 what is the default folder structure and location?

    Can someone point me to a diagram showing what should look like the 12.3.2 Itunes files?

    Used to use "Shared folder" for the media to itunes, but ready to give up and return to some itunes prefers now, for simplicity.  However! found no fewer than three structures records fragmentary itunes on my hard drive and I don't know which is the one preferred by itunes 12.3.2.  (Apparently when 12.3.2 installed himself, he ignored my arrangement in the Shared folder). Furthermore, trying to solve the problem I am have damaged the structure of the prime location and the most recent to itunes folder.  Ugh.  My stuff is safe.   My hardrive is riddled with itunes files, some of whom have nothing in their

    Thanks 1million

    On the iTunes library files - https://support.apple.com/HT201610 - does not mention that a complete library of work also includes other files and also files in the iTunes folder.

    More about the library files iTunes and what they do - http://en.wikipedia.org/wiki/ITunes#Media_management

    What are all these files in iTunes? - http://www.macworld.com/article/139974/2009/04/itunes_files.html

    Where are my iTunes files located? - http://support.apple.com/kb/ht1391

    iTunes 9 [and later]: understanding iTunes Media organization - http://support.apple.com/kb/ht3847 - more information on the Organization of the new structure https://discussions.apple.com/message/26404702#26404702

    Image of the folder structure and the explanation of the different versions of iTunes (post turingtest2) - https://discussions.apple.com/docs/DOC-7392 and making a portable iTunes library.

  • Create a folder with subfolders named structure

    I have a script that creates a project with a series of subfolders folder:

    The first step is to

    Tell application "Finder".

    text returned jobFolder value (display dialog "enter a working folder name:" default of answer "XYZ123 Customer_Project")

    This opens a dialog box where I enter the name of the project and client etc. This creates a folder with the same specific name.

    It then creates a folder in the call of the output files

    make new folder to the newfo to the properties {name: "output files}

    In the output files folder it then creates a folder with the same name as the name of the original folder "XYZ123 customer Name_Project" (or whatever it is I named it at the initial stage.)

    make new folder at the exit with properties {name: jobFolder}

    I'd like to create this folder with {name: jobFolder} + name of the printer

    for example;

    XYZ123 client Name_Project PRINTER_A

    XYZ123 client Name_Project PRINTER_ B

    XYZ123 client Name_Project PRINTER_ C

    Is this possible? Tips appreciated.

    Use the following code:

    make new folder at the exit with properties {name: jobFolder & 'PRINTER_A'}

    (138871)

  • AppleScript - creat a folder, subfolders and fill it with the sample image

    Please help me to achieve this goal, no doubt, simple goal.

    I did only a very small amount of applescripting before and always slaughtered other scripts of resources available online but am having hard to identify ways to achieve this.

    I would like to use applescript to automate the creation of a simple folder NewFolder and newSubFolders structure in a destination that the user can choose and the number of subfolders (subCount), selected using the command prompt:


    subCount value to text returned of (display dialog "how subfolders?" by default of answer 85)

    The NewFolder will always be in a format of date backwards for example 160202 for 2 February 2016.

    The sub folder names end with 3 numeric characters, leading 0s to whole number less than 100:

    160202_001, 160202_002, 160202_003 etc etc.

    With all these responses need the user to select an image file and duplicated it or should that be copied to all of the subfolders created by this script.

    All I got so far is to create a script that creates the folder with subfolders structure, but does not work how do the names of the end of records with 3 numeric characters or find out how copy/duplicate a file for each subfolder created by the script.

    Here's my starting point:

    the value JobName to text returned of (display dialog "Please enter Date reference:" default of '160411' response)

    loc to choose a folder with guest "choose the Parent folder location:

    say application 'Finder '.

    targetFolder value to create a new folder in loc with properties {name: JobName}

    end say

    Repeat

    subCount value to text returned of (display dialog "how subfolders?" by default of answer 85)

    Try

    If subCount ≠ "" then

    whole subCount

    output Repeat

    end if

    end try

    end Repeat

    Repeat with I have from 1 to subCount

    display the dialog box "my variable:"& I ".

    say application "Finder" to create a new folder to targetFolder with properties {name: JobName & "_" & I}

    end Repeat

    filetoCopy to Choose file with prompt "choose the image file to be copied."

    display the dialog box "my variable:" & filetoCopy ".

    It does not really matter I order in which the script should occur, i.e. the image file to be copied can be selected first before the creation of the all the subfolders etc... as long as the end result is the same structure.

    I had a look by adding leading 0s to a name of folder but don't really understand how I could do within the repetition that exists in my script.

    Any help much appreciated.

    Mike

    Although this still needs a lot of storage (including the addition of error checking) I managed to get working folders creating and copying a file to the set of folders.

    I'd appreciate it again any help in renaming with 000 leader after the _in, folder names.

    Here's where I'm up to:

    the value JobName to text returned of (display dialog "Please enter Date reference:" default of '160411' response)

    loc to choose a folder with guest "choose the Parent folder location:

    say application 'Finder '.

    targetFolder value to create a new folder in loc with properties {name: JobName}

    end say

    Repeat

    subCount value to text returned of (display dialog "how subfolders?" by default of answer 85)

    Try

    If subCount ≠ "" then

    whole subCount

    output Repeat

    end if

    end try

    end Repeat

    Repeat with I have from 1 to subCount

    say application "Finder" to create a new folder to targetFolder with properties {name: JobName & "_" & I}

    end Repeat

    say application 'Finder '.

    _destination to choose a folder with guest from "choose the main folder created above:

    filetoCopy to Choose file with guest "choose image file copy:

    display the dialog box "my variable:" & filetoCopy ".

    the value _listOfDest to (each of _destination folder ) as alias list

    Repeat with CurrentNumber from 1 to (count _listOfDest)

    duplicate filetoCopy file to the file (article of _listOfDest CurrentNumber)

    end Repeat

    end say



  • Export add to this catalogue creates duplicate folder tree

    Under folders, I have the disc space (d) and then my folder structure. I take a picture for export and select "add to catalogue". LR creates a new Local (d) disk under folders with the file of the newly exported file. I use LR CC on Win7 64 bit.

    For those seeking a response.

    Depending on how you choose the destination folder under Export location in the export dialog box, it returns the drive letter in upper or lower case. It's tiny, LR then creates a new disk in the folder Panel.

    If I search a folder in the folder tree in the choose a folder dialog box, I get a capital letter (d), if I take one of the icons of folders in the right pane, or navigation bar, I get a drive letter of the lower case (d).

    Thanks to Tanuj composition in my computer and diagnose the cause. Thanks to Victoria to have the right idea.

  • Can I create a new structured application that is a copy of a current One?

    Here's the situation: I'm new on the use of Dita to Framemaker, but became competent with the creative process. I don't understand the end of the development of things very well, however. What I want to do is have a second structured DITA that is identical to the first in every way except that in topic.template.fm, the page size will be set to 11 x 17, not asking for 8.5 x 11.  And I want to be able to apply this app structured in some of my DITA documents, but not all.

    I tried to create such a situation, first by copying and then rename the folder DITA (I called the news a DITA-BIG) in Adobe FrameMaker 8\structure\xml\ and in DITA-BIG, making this small change to topic.template.fm.

    I then added the renowned structured application structuredapps.fm (once, I've done a copy / paste of the element of DITA-topic-FM already there), change the name of the element to Dita-TopicBig-FM and the URL to point to those appearing in the DITA-BIG directory.

    The new structured application appears in Framemaker when I select StructureTools-> structured Application set, and I can select/apply to one of my documents. However, does not change the size of the document page. I tried to save the document by closing and reopening the document, the closing and reopening of Framemaker. The new, larger page size located in topic.template.fm in the DITA - BIG structured App is ignored.

    If I change the size of the page in the file topic.template.fm of origin, the document that uses the new structured allegedly application changes size so they correspond to the model in the old structured application.  But I need this model original stay at its original page size 8.5 x 11.

    I'm new to working with these files, so I don't know if I missed something or what I want can be done.

    Any advice?

    Hi Nina...

    Here's a topic that explains how to copy a structured application. This was written specifically for DITA-FMx, but the same concepts will apply, just the file names will be different.

    http://docs.leximation.com/DITA-FMX/1.1/?ditafmx_cloningtapps.html

    See you soon,.

    .. .Scott

    Scott Prentice

    Leximation, Inc..

    www.leximation.com

Maybe you are looking for

  • export of HDD to STC?

    Hello I have a short on 1920 x 1080. Now they are asking is to deliver to the STC. I don't have any idea how to do it and if it makes sense at all. What do you think?? It makes sense. How can I do? Thank you Paul

  • 'Find all Targets.vi' blocks 2009 development environment

    Hi people, This is a first for me - 2009 v9.0f3 running and have problems with the above vi (included as part of the example of "Replication of system"). I used this VI for a while now and never had this problem. The local NIC 10/100 the value by def

  • Subscribe to messages / discussions

    Hi all! Is there a way to 'subscribe' to a post without answer? Many times I see messages for which I don't have an answer but I'm definitely interested to see what the other one says people. However, I have not found a way to "Watch" a debate (get e

  • Planner

    How to operate the job scheduler twice a week that is to say the Monday and Thursday?

  • Cannot find "advance settings" uncheck the box - want to be able to create multi-page scans

    I found an answer, but we need to find a "advance settings" which - despite many research - I can't find on my new iMac screen.  My printer is a Photosmart 309 and I just downloaded the current hp printer driver.  I feel a bit silly. Can anyone help?