Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

move script

hi all,

my current scenario is .. I need to move a specific folder with the folder name

for ex 12122015....

in a month I may receive this folder in any of the dates

11122015 or 10122015 or 23122015 keeping dec as example

so I tried the below making a variable for date as todays date.. it works good. but as the folders dates are not the same ..in everymonth you may receive this folder on any of the dates .so today does not work ..so in a month if today is 24th I may get the folder dated 09202015

EXECUTE cmd /C move C:\Data\$(Date).in  D:\processed;

1 Reply
swuehl
MVP
MVP

Have a look in the HELP file, search for FOR EACH ... NEXT

Using DIRLIST mask syntax, you should be able to iterate over all folders and execute your command, something like

FOR Each Dir in dirlist (Root&' \*' )

EXECUTE cmd /C move $(Dir).in  D:\processed;

NEXT Dir