Issues Creating Directory

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
User avatar
CyberCitizen
Automation Wizard
Posts: 724
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Issues Creating Directory

Post by CyberCitizen » Wed Sep 02, 2015 8:01 am

Hi Guys,

Having an issue getting the create folder to work. Tried a bunch of combos. What am I missing?

Code: Select all

Let>INPUT_BROWSE=2
Input>vFolderPath,Please Select Image Folder,

Let>GFL_TYPE=0
GetFileList>%vFolderPath%\*.*,vFileList,;
Separate>vFileList,;,vFileNames
//MessageModal>Num Files: %vFileNames_count%
 
Let>k=0
Repeat>k
  Let>k=k+1
  //MDL>vFileNames_%k%
  Let>vFileDate=vFileNames_%k%
  StringReplace>%vFileDate%,%vFolderPath%\,,vFileDate
  Length>%vFileDate%,vDateLength
  MidStr>%vFileDate%,1,4,vYear
  MidStr>%vFileDate%,5,2,vMonth
  GoSub>sCreateFolder
Until>k,vFileNames_count

SRT>sCreateFolder
  IfDirExists>%vFolderPath%\%vYear%\%vMonth%
    MessageModal>temp folder exists - good
  Else
    MDL>%vFolderPath%\%vYear%\%vMonth%
    CreateDir>%vFolderPath%\%vYear%\%vMonth%
  Endif
END>sCreateFolder
FIREFIGHTER

hagchr
Automation Wizard
Posts: 331
Joined: Mon Jul 05, 2010 7:53 am
Location: Stockholm, Sweden

Re: Issues Creating Directory

Post by hagchr » Wed Sep 02, 2015 8:53 am

Hi, It seems you need to create the directory in steps, ie

Code: Select all

CreateDir>%tmp%\2015
CreateDir>%tmp%\2015\07

User avatar
CyberCitizen
Automation Wizard
Posts: 724
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Re: Issues Creating Directory

Post by CyberCitizen » Wed Sep 02, 2015 9:03 am

I swear I tried that, but thank you that worked.
FIREFIGHTER

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts