CreateFolderEx - a script command for extended "CreateFolder" functionality.
Commandline params:
NUMBERED - Create multiple numbered folders.
Consider usage in combination with "{dlgString}" to request only specific params.
Options:
- start (start index, optional)
- end (end index, required + standalone)
- interval (numbering interval, optional)
- pad (number of digits, defaults to "2", disable with "0")
- add (remember last used index and add x folders, optional)
- set (set last used index, optional + standalone)
- reset (reset/clear last index, optional + standalone)
- resetall (reset/clear all indexes, optional + standalone)
- addexisting (determine last index in current folder and add x folders, optional)
Examples:
Create 20 folders, numbered from 1-20, called "My NumFolders XX":
CreateFolderEx NAME="My NumFolders" NUMBERED="end=20"
Numbering put to the front and separated by "-", ask for start index:
CreateFolderEx NAME="My NumFolders" NUMBERED="end=20,start={dlgstring|Enter start:|5}" PATTERN="%num%-%name%"
Skip all the uneven ones, disable the zero-padding and put them to "C:\tmp":
CreateFolderEx NAME="C:\tmp\My NumFolders" NUMBERED="end=20,interval=2,pad=0"
Create one new numbered folder with each execution, 3 digit numbering, index is globally remembered:
CreateFolderEx NAME="Season" NUMBERED="start=1,end=1,add=1,pad=3"
Create 5 new folders with each execution, only 1 folder on first use or when no folders exist yet (with that name), index is determined by existing folders:
CreateFolderEx NAME="Season" NUMBERED="start=1,end=1,addexisting=5,pad=3"
Reset global index, do not create any folders:
CreateFolderEx NAME="Season" NUMBERED="reset"
Reset all global indexes, do not create any folders:
CreateFolderEx NUMBERED="resetall"
NUMBEREDASK - Create multiple numbered folders by requesting all necessary details.
Default values in the dialog can be altered by using following options.
Options:
- start (start index, optional)
- end (end index, optional)
- interval (numbering interval, optional)
- pad (pad numbers with zeros, defaults to "1", disable with "0")
Examples:
Open the NUMBEREDASK dialog:
CreateFolderEx NUMBEREDASK
Open the NUMBEREDASK dialog with a custom default:
CreateFolderEx NAME="My NumFolders" NUMBEREDASK="start=10,end=20,pad=0"
NAME - Folder name or basename (may include path)
PATTERN - Pattern for the final folder name (default is "%name% %num%").
SETTABVAR - Return the created folders (their names) in a tab variable
SETENVVAR - Return the created folders (their names) in an env variable
PT - Pass through options and switches to the native CreateFolder command
Installation:
To install the command, download the *.js.txt file below and drag it to Preferences / Toolbars / Scripts.
Todo:
NUMBERED="resetall" requires NAME argument, though that's not really needed, will be fixed
cya,
tb
Download:
-
Latest: v0.4.1 / 2016.01.27 - automode, settabvar, pt, default "OK"
Command.Folder_CreateFolderEx.js.txt (49.9 KB) -
v0.3 / 2015.04.15 - new NUMBERED options: "set", "add", "addexisting", "reset", "resetall", command label corrected:
Command.Folder_CreateFolderEx.js.txt (43.3 KB) -
v0.2 / 2015.04.14 - set pattern in dialog, speedup, issue fix:
Command.Folder_CreateFolderEx.js.txt (27.5 KB) -
v0.1 / 2015.04.14 - initial version:
Command.Folder_CreateFolderEx.js.txt (25.8 KB)