Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Directory;
SUB DoDir (Root)
FOR each File in filelist(Root& '\*HOSTTRNAI.TXT')
LOAD 'HOSTTRNAI.TXT' as source1,
date(date#(right(filedir(),6),'DDMMYY'),'DD MMM YYYY') as Filename2,
fields,Where date(date#(right(filedir(),6),'DDMMYY'),'DD MMM YYYY'>='01 Mar 2012'
//This takes all the files ending in HOSTTRANAI.txt, in the folder and subfolders of"Mar 12" and grabs the data from them which is then put into a table,. Each file is in a
FROM [$(File)] (txt, codepage is 1252, embedded labels, delimiter is ',', msq);
NEXT File
FOR each Dir in dirlist (Root&'\*')
CALL DoDir(Dir)
NEXT Dir
END SUB
CALL DoDir('S:\Filepath\Mar 12')
//subfolder named
//DDMMYY as such this is a new field in the table. I would like to be able to use the line in bold to choose which files to grab, but my knowledge of the where command
i//is lacking.
Help would be appreciated.
Hi, simonplace
Your script came in plain text. Which one is the line in bold that you want to adjust?
Regards,
Erich