Create the hierarchy of the folders and multiple subfolders

Dear friends,

I copied the script to "create folder hierarchy" (created from chinna), but I need small change in their script, I added the below comment purposes created subfolder, its also created.

But I need several folder created in the same hierarchy (see the screenshot "my requirement")

var target is Folder.selectDialog ("choose a target folder");.

If (!) ((Folder(target+"/"+"Folder A"))) .exists)

{

new folder (target + "/" + "PRODUCTION" + "/" + "APPL" + "/" + "DD-MM-YY") .create ();

}

OUTPUT:

Screen Shot 2014-08-02 at 4.00.58 PM.png

MY REQUIREMENT IS:

Screen Shot 2014-08-02 at 4.00.49 PM.png

Thanks in advance:

Kanaga kumar. k

Hi kanaga kumar,.

There are several ways to do so. With the logic of the Cognet script, you can do something like this:

var target = Folder.selectDialog("Choose a target folder");
if(!(Folder(target+"/"+"PRODUKTION")).exists) {
    new Folder(target+"/"+"PRODUKTION").create();
    }
if(!(Folder(target+"/"+"PRODUKTION"+"/"+"APPL")).exists) {
    new Folder(target+"/"+"PRODUKTION"+"/"+"APPL").create();
    }
if(!(Folder(target+"/"+"PRODUKTION"+"/"+"FONTS")).exists) {
    new Folder(target+"/"+"PRODUKTION"+"/"+"FONTS").create();
    }
if(!(Folder(target+"/"+"PRODUKTION"+"/"+"IMAGES")).exists) {
    new Folder(target+"/"+"PRODUKTION"+"/"+"IMAGES").create();
    }
if(!(Folder(target+"/"+"PRODUKTION"+"/"+"PDF")).exists) {
    new Folder(target+"/"+"PRODUKTION"+"/"+"PDF").create();
    }

Have fun

Tags: InDesign

Similar Questions

  • Creating the folder and by assigning the role access list, approach programmatic

    Hi all

    I have a requirement to create the folder and assigning RAL in the folder created by the UCM (11.1.1.8) program

    I found RIDC API to use for creating folders, can I use the same for the assignment of RAL, pointers?

    Thank you

    You get errors?

    This blog can be useful: adding a file in folders of the WebCenter RIDC content frame. Niels Krijger

    Jonathan

    http://jonathanhult.com

  • Urgent-renamed the folder in the folders and now error for all users?

    Hello
    Well I asked me to shorten a name in the shared folders and so I changed it. Now, I get an error if I click on tables of edge or shared folders (which is empty now btw?) or a catalog management, its display:

    Target path not found (operations customer/Shared /) error Code: GZ8VXQ96.

    Are we not supposed to create a folder in the folders and then change the name?

    Help, please. The server administrator BI tells me that everything the world reports are currently not available.

    Years

    Are we not supposed to create a folder in the folders and then change the name?

    You can, but as we are engineers, you can also expect impact of this...

    fix your problem is:

    1 rename the current folder in older...
    2. now, try to perform the operation and everything by doing this, you might have seen as option: preserve references to the old name of this item. below the field to rename...
    3. give the new name and use the name option preserve...

  • Reorganize all the folders and subfolders manually, after the reboot, changes were not saved and return to the default settings

    I arranged recently manually all the folders and subfolders by list and alphabetical order, but when I turned my computer off and turn it back on, it goes back to the default settings.  I need to know what setting I need to change to avoid it too reset and also how to organize all the files and subfolders both (list and alphabetical order) because it is very long and fustrating to go into each folder and do it, can you help me with a quick and simple solution?

    * original title - arranged manually all the folders and subfolders by list and alphabetical order, but when I turned my computer off and turn it back on, it goes back to the default settings *.

    Hi Lilian13,

    You can read the following article and check if it helps:

    Organize, sort, or group your files

    http://Windows.Microsoft.com/en-us/Windows7/arrange-sort-or-group-your-files#section_1

    Hope this information is helpful

  • How to change Windows Sync dividing the folders and files in alphabetical order

    Remember - this is a public forum so never post private information such as numbers of mail or telephone!

    • Windows Sync has divided the folders and subfolders in alphabetical ranking. I want my old transparent back and stopped synchronization partnerships. The only way that I can temporarily return the old display windows is to change the name of the folder. How can I stop Windows automatically it? Recent changes to your computer. I work towards a date limit and cannot stop windows from doing this and can not find an answer.
    • I have tried going to the Sync Center, but impossible to find a solution. Even tried Sync delete but Windows does not allow this.

    Try turning off the center of synchronization to run at startup as follows: http://www.vista4beginners.com/Disable-Sync-Center.  In my opinion, who will take care of the problem.

    I hope this helps.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Within the last week, that all the folders and files on my hard drive were selected 'read only '.

    I unflagged all the folders and files that I share on my home network, however, I am not able to rename them or save them on my PC from my laptop on my wireless network. This has happened since May 12 and I suspect an auto update changed or recover from something.

    Running Vista Home Premium SP2 on PC

    Laptop is Windows 7

    Thanks for getting back to me Mick!

    I did a restore to 5/10 when I had no problem, but the problem persisted.

    I'll have to try Norton support. This may be something they did.

    In the meantime, I managed to change the names of files by connecting to the PC with the account of my wife who as co-owner had equal rights and the sign of the laptop is its ID as well so it worked, but it isn't always fair.

    Once again, thank you...

  • All of a sudden I've locked the folders and files on my system. How to unlock the files?

    I'm as Windows 7 Home Premium 32-bit slot. All of a sudden I've locked the folders and files on my system. I am the administrator and the only user of my computer. What happened to cause this? How to unlock the files?

    I right click on them and there is no label of 'ownership '.

    Angi

    Hello

    ·          How do you lock the folders?

    ·          The question came with all the files and folders?

    Step 1: Here's how you can take ownership of the files/folders

    a. right click on the file or folder and then click Properties.

    b. click the Security tab.

    c. click on a user name or group under group or user names.

    http://Windows.Microsoft.com/en-us/Windows7/what-are-permissions

    Step 2: Run the fix it to http://support.microsoft.com/mats/windows_file_and_folder_diag/

    Diana

    Microsoft Answers Support Engineer

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Hi, I created the procedure and its code is / / DELETE FROM <? = odiRef.getObjectName ("L", "TRG_SALES", "ORACLE_ORCL_LOCAL_SALES", "", "D")? > / / and when I'm running, the error appeared //com.sunopsis.tools.core.exception.SnpsSimpleMessageExcepti

    Hi, I created the procedure and its code is / / DELETE FROM <? = odiRef.getObjectName ("L", "TRG_SALES", "ORACLE_ORCL_LOCAL_SALES", "", "D")? > / / and when I'm running, the error appeared.

    com.sunopsis.tools.core.exception.SnpsSimpleMessageException: ODI-17517: error in the interpretation of the task.

    Task: 1

    java.lang.Exception: the application script threw an exception: com.sunopsis.tools.core.exception.SnpsSimpleMessageException: Exception getObjectName ("L", "TRG_SALES", "ORACLE_ORCL_LOCAL_SALES", "DEVELOPMENT", "D"): SnpLSchema.getLSchemaByName (): SnpLschema is no information OSB: Delete_Tar_Sales on line: column 0: columnNo

    at com.sunopsis.dwg.codeinterpretor.SnpCodeInterpretor.transform(SnpCodeInterpretor.java:489)

    at com.sunopsis.dwg.dbobj.SnpSessStep.createTaskLogs(SnpSessStep.java:737)

    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:465)

    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2128)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ 2.doAction(StartSessRequestProcessor.java:366)

    at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)

    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$ 0 (StartSessRequestProcessor.java:292)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ StartSessTask.doExecute (StartSessRequestProcessor.java:855)

    at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)

    to oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$ 2.run(DefaultAgentTaskExecutor.java:82)

    at java.lang.Thread.run(Thread.java:662)

    Caused by: java.lang.Exception: the application script threw an exception: com.sunopsis.tools.core.exception.SnpsSimpleMessageException: Exception getObjectName ("L", "TRG_SALES", "ORACLE_ORCL_LOCAL_SALES", "DEVELOPMENT", "D"): SnpLSchema.getLSchemaByName (): SnpLschema is no information OSB: Delete_Tar_Sales on line: column 0: columnNo

    at com.sunopsis.dwg.codeinterpretor.SnpCodeInterpretor.transform(SnpCodeInterpretor.java:476)

    ... 11 more

    Caused by: org.apache.bsf.BSFException: the application script threw an exception: com.sunopsis.tools.core.exception.SnpsSimpleMessageException: Exception getObjectName ("L", "TRG_SALES", "ORACLE_ORCL_LOCAL_SALES", "DEVELOPMENT", "D"): SnpLSchema.getLSchemaByName (): SnpLschema is no information OSB: Delete_Tar_Sales on line: column 0: columnNo

    at bsh.util.BeanShellBSFEngine.eval (unknown Source)

    at bsh.util.BeanShellBSFEngine.exec (unknown Source)

    at com.sunopsis.dwg.codeinterpretor.SnpCodeInterpretor.transform(SnpCodeInterpretor.java:471)

    ... 11 more

    Text: REMOVE OF <? = odiRef.getObjectName ("L", "TRG_SALES", "ORACLE_ORCL_LOCAL_SALES", "", "D")? >.

    at com.sunopsis.dwg.dbobj.SnpSessStep.createTaskLogs(SnpSessStep.java:764)

    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:465)

    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2128)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ 2.doAction(StartSessRequestProcessor.java:366)

    at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)

    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$ 0 (StartSessRequestProcessor.java:292)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ StartSessTask.doExecute (StartSessRequestProcessor.java:855)

    at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)

    to oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$ 2.run(DefaultAgentTaskExecutor.java:82)

    at java.lang.Thread.run(Thread.java:662)

    If you do this in a procedure, use the following syntax:

    <%=odiRef.getObjectName("L", "TRG_SALES", "D")%>

    and set the relevant logical schema in the options on the target tab of the procedure. Also, make sure you only select the correct technology type in the options on the target tab.

  • have 5 LR and CC. The folders are different, some are missing in the CC. And some complete are not available in CC. I'm looking forward to use CC rather than LR5 so how can I make the folders and collections even on each?

    have 5 LR and CC. The folders are different, some are missing in the CC. And some Collections are not available in CC. I'm looking forward to use CC rather than LR5 so how can I make the folders and collections even on each?

    Hi cjohnm,

    You can use the 5 Lightroom Catalog and improve it in Lightroom 6, therefor all folders and collections will be identical in both version.

    Open the Lightroom all holding the key Alt/Opt and select only the 5 Lightroom Catalog and it will switch to it.

    Let us know if that helps.

    Kind regards

    Mohit

  • I just paid almost $10 to create a PDF from a jpg file, but I did it so that I can change it. Now I find that I needed another Adobe package that would create the pdf AND I would change it. What should I do now?

    I just paid almost $10 to create a PDF from a jpg file, but I did it so that I can change it. Now I find that I needed another Adobe package that would create the pdf AND I would change it. What should I do now?

    If you create a PDF file from an image, it is always a picture, and you cannot change it.

    If the image contains text, then you need to perform the text recognition (OCR) before you can actually change the text.  Acrobat can do that.

  • Oracle 11g R2, CREATE THE TABLE and QUOTAS

    Hi all
    I need some insight on a strange behavior, that I discovered in Oracle 11 g 2. Don't know if I'm missing something or if I just discovered a security issue with Oracle.

    Oracle Version: 11.2.0.1.0

    The problem is with the CREATE TABLE and the QUOTA on the specific tablespace privilege.

    Please, try this on your system (if you have some free time and care to confirm the "bug").

    Create a user, grant privileges than two, CREATE THE SESSION and CREATE TABLE.

    Grant NO quota on any tablespace.

    Try to create a table on any tablespace (except SYSTEM) and everybody say if it worked or not.

    The oracle documentation provides the following:

    To create a relational table in your own schema, you must have the CREATE TABLE system privilege. To create a table in the schema of another user, you must have the CREATE ANY TABLE system privilege. In addition, the owner of the schema containing the table must have a quota of space on the tablespace contains the table or the UNLIMITED TABLESPACE system privilege.

    [http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/statements_7002.htm#SQLRF01402]

    The fact is, so far, on two different instances of Oracle 11 g 2, my users are not limited in the creation of the tables only when they have quotas, but where they want to, except the STRING.

    The behavior correct would be to deny the creation of the table the tablespace where there is no quota, but it does not work.

    My instance of Oracle 10 g behave properly and therefore the creation of the table is denied the tablespace with no quota.

    P.s1 sorry if this a well known "bug/problem/question". I've been ridiculous on a well-known forum for the same question. I don't need to be "filled spoon" as shown on this famous site! I have read the documentation! I googled a lot!

    P.s2 even if the creative work of table on tablespace with no quota, you cannot insert data into it. Yes, big picture, the user cannot not filled space with irrelevant data tables, but it can create thousands of tables...!

    Did I miss something?
    Is there a 'default' option I have to mark to prevent the creation of the table where it shouldn't?
    ? (?)

    Please read http://tkyte.blogspot.com/2011/02/deferred-segment-creation.html.

  • Folder XP 'customize' properties tab with "applies to subfolders" checked applied property passes to all folders and all subfolders on the computer.

    While creating a new music folder in XP and using the tab of "Customizing" folder properties, properties that had to be "applied to all subfolders" apply properties to all folders and subfolders on the computer and attached externally. How can I retrieve short to restore the entire disk (my drive is saved with the Windows backup feature)?

    You can finely tune and crafts which properties are applied to files by using the option you mentioned, as well as "templates folder" as well.  But using both in tandem is not very intuitive.

    Although it was created using Windows 8 for example, the video below also works for Windows 2000, XP, Vista and 7.  This should help you to set up your personalized finely folder and spread it to all folders of the same type.

    Apply Styles folder to all subfolders [Video]

    cmdrkeene.com/Apply-Folder-styles-to-all-subfolders
  • Irregular behavior of the task on all the folders and files list

    Hello:

    The list of tasks that appears as well as hyperlinks to content on each of the personal folders (My Documents, my pictures, and my music), corresponding to each of my accounts 3 user (an admin and two limited), appears the same when I opened to what that is (in 2 music management accounts) and management of images in third-party including their corresponding symbols or icons that are both listed in the list of tasks and in the window itself.

    Even in the help and support center, general information, articles and tutorials, when I search for 'Folder My Documents', among the results displayed are "Introduction to My Pictures Folder" and clicking on it opens the tutorial for "Introduction to personal folders?

    All files on my PC (including the local drive (preload (c)), are also affected, showing the only music management in all its parts.

    The file and folder tasks (rename, copy, move, delete, etc.) in the drop-down menu when you select a folder or a file, are ok and works correctly.

    So, how can I correct this irregular behavior? without having to reinstall Windows if you please...

    Thank you and best regards.
    RickCP

    RickCP-Windows XP Home Edition SP3

    Hello

    As I mentioned in my previous post, please create new account with administrator privileges and check if the problem persists. Follow the steps mentioned in the article below.

    How to copy data from a corrupted to a new profile in Windows XP user profile

    http://support.Microsoft.com/kb/811151

    Thanks and regards.

    Thahaseena M
    Microsoft Answers Support Engineer.
    Visit ourMicrosoft answers feedback Forum and let us know what you think.

  • My question is: since I created the folders of file at the beginning,...

    Hello again: (using CS4 under Windows Vista)

    When I open "Adobe first Auto Save Files" it's a long list of all my projects. There is my project with his copy and all associated below files. Nothing, I'm sure that you are not familiar with.

    My questions are:

    Given that I have created folders file at first, can I create folders of files separated now to put these as elements in?

    Second, I can put other files related to different categories as "preview files and encoded files in the same folder? But why would I do that, right?

    Is it safe to move a folder of file already created in this new file folder until they under the same category?

    Quite simply, can I simply and securely move files to other locations without danger? I DO NOTwant to change all file names. I hear that maybe something.

    I want to organize my files better, but I think I've read things about playing with these files and jacking with all your projects.

    Thank you

    Jim

    Don't do it with existing projects. Save the headache and troubleshooting. Leave it as it is.

    For new projects, set your preferences, the media and the "scratch disks" to how you want to organize in the future.

  • Could someone tell me how to stop the folders and icons rearrange themselves

    Before I updated to El Capitan I could arrange the files on my desktop or in any folder in the finder, in order that, I opened I wanted and they would REMAIN THAT of the WAY. Now, folders and icons in the folders reorganize themselves, usually in alphabetical order, each time that I add, delete, or move something in a folder. This causes a serious pain for me and make my extremely inefficient workflow.

    I managed to stop the folders on my desk of reorganization by going to view > options > sort by selecting: None (thanks Mac forum) and I can do this in a folder if I want to rearrange things myself, but I seem to need to do this individually for every single folder and there is no guarantee that the next time I turn on my computer it will be always in that order. El Capitan before I could move my files manually on my desk and in a folder and if things got a little messy, or I wanted to start, I simply chose sort > by name and everything would be perfectly back to alphabetical, as a grid, on the right side of my screen, or in a grid at the top of a file. AND... If I wanted to manually move a folder or icon after sorting by name, I could still do it, without having to go to tri: No. Now, if I say sort: None, which seems to be the only way to manually sort the icons or folders, all of a sudden my own grid of files are everywhere in my office or mixed into a folder, unlike before where they would simply stay in a grid in alphabetical order, making it much easier to find things when manually reorganize. In my workflow, I need to be able to fix things and make them stay there, then, how do it works as before. Is could someone please tell me if there is a simple way to get things to work like they used to, when the only time where my files or icons arranged themselves was when I SAID to THEM, keeping in mind I'm not that computer, so if it's code, or go beyond the preferences or settings , you've lost me.

    Click on the desktop, command J > sort by none

Maybe you are looking for