Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
In short, I'm trying to build a table that will give me the names of all the QVDs and QVWs in our main production folder and their last update time (QvdCreateTime()). I'd like to be able to loop through all the filenames in the folder, but have a ways to go for that. Any suggestions or examples?
Right now, I'm trying to use the FileName() function to to capture the file name of a certain path with all the following examples;
LET DataPath = 'C:\Documents'; // Works correctly
LET vPath_File = '$(DataPath)\Abc.QVD'; // Works correctly
LET vTimeStamp = QvdCreateTime('$(vPath_File)'); // Works correctly
LET vFile_Name1 = FileName('$(vPath_File)'); // DOES NOT WORK
LET vFile_Name2 = FileName(["C:\Documents\Abc.QVD"]); // DOES NOT WORK
LET vFile_Name3 = FileName(['C:\Documents\Abc.QVD']); // DOES NOT WORK
LET vFile_Name4 = FileName('C:\Documents\Abc.QVD'); // DOES NOT WORK
Anyone see what I'm missing?
Thanks!
Hi Rob,
do you know DoDir?
I don't think FileName() takes any parameters and it should be used within a Load.
Load *, FileName() As FileName
FROM C:\Documents\Abc.QVD;
Then you could probably:
Peek('FileName', 0, TableName)You may be able to create a batch file to write out a list of all files in a directory and then read that in. Then loop through each record in the list file.
Thanks everyone! I think this is what I'm looking for...
Hi Martina,
Could youe please explain, why there was n? ?
DoDir(root,n)
Thanks and Regards
Satti ![]()