I was trying to list out all the .tab files in a folder, and store the files as .qvd with the same name. Hence, I tried to take the FileName from the list of files. I failed to store the .qvd file in a separate folder with the same name as the .tab file.
I have specified variables for the folder paths as the script is needed to run on a schedule basis by the power users with 15 different files.
sub Dodir(Root) for each FileExtension in 'tab' for each FoundFile in filelist( Root & '\*.' & FileExtension) let FoundFile = PurgeChar(FoundFile , Chr(39)); FileList: load '$(FoundFile)' as Filename, subfield('$(FoundFile)','\') as Name Autogenerate(1); next FoundFile next FileExtension end sub
Re: Store in variable path with variable file name
Hi SK. Thanks for your reply. However, it didn't work. Apparently putting both the path and filename as variable is just not being done in QV. I have done a workaround by moving the files instead after storing the tables in QVD.