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!
Create Multiple Folder with sequential numbers
-
highend
- Posts: 14949
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Create Multiple Folder with sequential numbers
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++;
}One of my scripts helped you out? Please donate via Paypal
-
nbernard
- Posts: 8
- Joined: 07 May 2015 09:36
Re: Create Multiple Folder with sequential numbers
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
Thank you so much...in advance
-
highend
- Posts: 14949
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Create Multiple Folder with sequential numbers
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.
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.
One of my scripts helped you out? Please donate via Paypal
-
nbernard
- Posts: 8
- Joined: 07 May 2015 09:36
Re: Create Multiple Folder with sequential numbers
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?
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?
-
highend
- Posts: 14949
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Create Multiple Folder with sequential numbers
Show a screenshot of where you put it exactly please (because it works fine from a button for me).When I paste the script and run it via the button, it pulls up the 'stepping through a script' window.
The latterAm 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.
One of my scripts helped you out? Please donate via Paypal
-
nbernard
- Posts: 8
- Joined: 07 May 2015 09:36
Re: Create Multiple Folder with sequential numbers
It's working now, I had Step Mode checked off under the scripting menu
My internet is down on my PC, (using my phone now) I'll donate to your PayPal shortly.
Thanks a million!
My internet is down on my PC, (using my phone now) I'll donate to your PayPal shortly.
Thanks a million!
XYplorer Beta Club