Ideas for new features & functions
Moderators: Dorian (MJT support), JRL
-
JRL
- Automation Wizard
- Posts: 3524
- Joined: Mon Jan 10, 2005 6:22 pm
- Location: Iowa
Post
by JRL » Thu Jul 21, 2011 4:22 pm
Help for CreateDir> wrote:CreateDir>directory
Creates a new directory. The directory may be a full path.
To me this implies that CreateDir> will create a full path where none existed before but that is not currently the case. CreateDir> will only add a directory onto the end of an existing path.
One can use the DOS "md" or "mkdir" commands which will create a full path even when none of the directories in the path previously existed. But one could do the same to add a directory onto the end of an existing path. Why bother with CreateDir>? One obvious reason is convenience.
IMHO it would be even more convenient if CreateDir> was capable of creating all of the non existent directories in a specified path.
Thanks,
Dick
-
jpuziano
- Automation Wizard
- Posts: 1085
- Joined: Sat Oct 30, 2004 12:00 am
Post
by jpuziano » Sat Aug 20, 2011 6:47 pm
JRL wrote:Help for CreateDir> wrote:CreateDir>directory
Creates a new directory. The directory may be a full path.
To me this implies that CreateDir> will create a full path where none existed before but that is not currently the case. CreateDir> will only add a directory onto the end of an existing path.
That's the impression I get as well. Seems to me either the Help File should be changed to re-word this or... the function should be changed so it actually can do this.
JRL wrote:Why bother with CreateDir>? One obvious reason is convenience.
IMHO it would be even more convenient if CreateDir> was capable of creating all of the non existent directories in a specified path.
I second that thought... great observation JRL.
-
Grovkillen
- Automation Wizard
- Posts: 1128
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
-
Contact:
Post
by Grovkillen » Thu Feb 07, 2013 11:56 am
Any ideas if this will be implemented?
-
Grovkillen
- Automation Wizard
- Posts: 1128
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
-
Contact:
Post
by Grovkillen » Thu May 23, 2019 11:03 am
I have created this snippet to do this:
Code: Select all
Let>TEST_PATH=%SCRIPT_DIR%\hello\you\how\are\you\doing
GoSub>CREATE_FOLDERS,TEST_PATH
Let>TEST_PATH=%SCRIPT_DIR%\YO\you\how\are\you\doing
GoSub>CREATE_FOLDERS,TEST_PATH
SRT>CREATE_FOLDERS
Separate>CREATE_FOLDERS_var_1,\,FOLDER_ARRAY
Let>TEMP_FOLDER=
Let>CREATE_FOLDERS_k=0
Repeat>CREATE_FOLDERS_k
Let>CREATE_FOLDERS_k=CREATE_FOLDERS_k+1
Concat>TEMP_FOLDER,FOLDER_ARRAY_%CREATE_FOLDERS_k%
IfNotDirExists>TEMP_FOLDER
CreateDir>TEMP_FOLDER
Endif>
ConCat>TEMP_FOLDER,\
Until>CREATE_FOLDERS_k=FOLDER_ARRAY_count
END>CREATE_FOLDERS
-
JRL
- Automation Wizard
- Posts: 3524
- Joined: Mon Jan 10, 2005 6:22 pm
- Location: Iowa
Post
by JRL » Thu May 23, 2019 4:25 pm
As I stated in the original post, all you need is DOS. Add
Let>
RP_Windowmode=0 to avoid the DOS popup window
Code: Select all
Let>TEST_PATH=%SCRIPT_DIR%\hello\you\how\are\you\doing
GoSub>CREATE_FOLDERS,TEST_PATH
Let>TEST_PATH=%SCRIPT_DIR%\YO\you\how\are\you\doing
GoSub>CREATE_FOLDERS,TEST_PATH
SRT>CREATE_FOLDERS
RunProgram>cmd /c md "%CREATE_FOLDERS_var_1%"
END>CREATE_FOLDERS
-
Grovkillen
- Automation Wizard
- Posts: 1128
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
-
Contact:
Post
by Grovkillen » Thu May 23, 2019 9:16 pm
Thanks for that clean up