05-22-2024, 03:33 PM
(05-22-2024, 03:05 PM)madscijr Wrote:(05-22-2024, 02:29 PM)euklides Wrote: Well, for a single file, you can use this...
(Here the code do not test if the file exist !)
Thanks, I will give that a try when at the computer!
(05-22-2024, 02:37 PM)SMcNeill Wrote: wmic DataFile where "Name='D:\\Path\\To\\myfile.txt'" get LastModified /VALUEThanks - is this a command line thing? Can you show how to get that in a variable in a QB64PE program?
Code: (Select All)
Shell "wmic DataFile where " + Chr$(34) + "Name='Z:\\foo.pdf'" + Chr$(34) + " get LastModified /VALUE > temp.txt"
_Delay .5
Open "temp.txt" For Input As #1
Do
Line Input #1, temp$
Print temp$
Loop Until EOF(1)
Close
You may get the results back in wide format, so you might want to strip spaces out, depending on your OS settings.