Page 1 of 1

Create Multiple Folder with sequential numbers

Posted: 07 May 2015 09:40
by nbernard
I'm trying to create a script that would allow me to make x amount of folders with a certain number sequence.
For example, it would produce 5 different folders at a time named
43563
43564
43565
43566
43567
I know I can go to Edit>New Folders... however I often create 20+ folders at a time and it seems like there should be an easier way to create a number range of folder specific to my criteria.
Any help is much appreciated. I'm not familiar with scripting and everything I'm trying is not working.
Thanks in advance!

Re: Create Multiple Folder with sequential numbers

Posted: 07 May 2015 10:12
by highend
Enter e.g.: 5,43563

Code: Select all

$start = input("Enter how many folders should be created", "Separate the starting number with a ','", , , , 250, 150);
    $startName = gettoken($start, 2, ",");

    while ($i++ < gettoken($start, 1, ",")) {
        new($startName, "dir");
        $startName++;
    }

Re: Create Multiple Folder with sequential numbers

Posted: 07 May 2015 17:31
by nbernard
That looks like it will work, and I will happily donate to your paypal....but can you please tell me what I'm supposed to do with the script? I'll take a button or a keyboard shortcut. I'm having trouble with it, again I'll pay you, please be specific.
Thank you so much...in advance

Re: Create Multiple Folder with sequential numbers

Posted: 07 May 2015 17:41
by highend
1. Rightclick on the toolbar, choose "Customize Toolbar..."

Add a "User Button #<number>" from the left pane to the right one.
Position it (Up / Down), click "OK"

Rightclick that button, choose "Edit..."

Give it a name, maybe an icon. Click on "Edit..." in the "On left click:" line.
Paste the script. Close everything by hitting "OK".

2. To use it with a keyboard shortcut, e.g.:
Menu - User - Manage Commands...
Left side, click on "Run Script" in the "Category" part of the window

Click "New..." -> Add New Command

Give it a caption (a name)
Click on "Edit..." in the Script line.
Paste the script. Click "OK"

Click on "Assign Keyboard Shortcut..." and assign the one you like.

Done.

Re: Create Multiple Folder with sequential numbers

Posted: 07 May 2015 21:37
by nbernard
When I paste the script and run it via the button, it pulls up the 'stepping through a script' window.
Am I supposed to insert the numbers (say 5 for the folders & 43563 for the starting number) into that script, or am I going to be prompted to do so when I hit hte button.
If I put it into the script, where does it go?

Re: Create Multiple Folder with sequential numbers

Posted: 07 May 2015 22:56
by highend
When I paste the script and run it via the button, it pulls up the 'stepping through a script' window.
Show a screenshot of where you put it exactly please (because it works fine from a button for me).
Am I supposed to insert the numbers (say 5 for the folders & 43563 for the starting number) into that script, or am I going to be prompted to do so when I hit hte button.
The latter :)

Re: Create Multiple Folder with sequential numbers

Posted: 08 May 2015 07:22
by nbernard
It's working now, I had Step Mode checked off under the scripting menu :roll:
My internet is down on my PC, (using my phone now) I'll donate to your PayPal shortly.
Thanks a million!