Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
I have a folder that have many sub-folders with this names Month_Year , example : Mai_2014
I want to search through that folder and find the latest month/year available.
So the question is : How can i store this information (Mai 2014 for example) in a variable in the loading script.
Thank you
Example :
Folder
---- January_2014
---- February_2014
---- March_2014
So the result will put March_2014 in a variable.
You could use a directory load to get the file names as a field
So it would look something like this
FOR each Dir in dirlist ('Put the full file path for the folder containing the files you need loaded here')
Load Distinct
FileName() as FileName
FROM
$(Dir)\*
;
Then just split out the year and month and find the max value to set as a variable.