PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → How to retrieve active datafiles list through programming?
How to retrieve active datafiles list through programming?
Iniciado por guest, 20,dic. 2015 07:28 - 3 respuestas
Publicado el 20,diciembre 2015 - 07:28
Hi all,
I have a number of data files in my analysis...I am using some datafiles only during execution and the data stored to different directories (Hchangedirectory) other than dafault directories...Now I would like to know the current directory of the datafiles during execution...ie , the complete list of active datafiles and their real time directories ,through program...plz suggest a solution....
Publicado el 21,diciembre 2015 - 11:04
Hi,

You will have to list all the files in the analysis and then return the directory where each of them is stored.

For instance, you can use the following code (maybe you will have to adapt it to your situation):

FileList is string = HListFile(hLstNormal)
TableInfo is string = ExtractString(FileList, firstRank, CR)
WHILE TableInfo <> EOT
Trace({TableInfo,indFile}..Directory)
TableInfo = ExtractString(FileList, nextRank, CR)
END

Please refer the help page 'HListFile', where you will find more information.

Regards,

Bruno
Publicado el 22,diciembre 2015 - 11:36
Maybe YourDataFile..Directory

Something like this:

sDataFiles is string = HListFile("",hLstAll)
i is int = StringCount(sDataFiles,CR)+1
sDataName is string

FOR x = 1 TO i
sDataName = NoSpace(ExtractString(sDataFiles,x,CR))
Info({sDataName}..Directory)
END
Publicado el 23,diciembre 2015 - 10:02
Thank you so much ICI,

Your tip works like a charm..perfect for our problem..

Regards