05-03-2025, 04:10 AM
(05-03-2025, 03:51 AM)madscijr Wrote:You don't need 'C' to get the file modified date/time stamp if you use the Whereis utility which I posted above..(05-03-2025, 01:59 AM)hsiangch_ong Wrote: thank you to @spriggsyspriggs and gpt.You're telling me that to get a file's modified date from BASIC we have to do it in C?
i just tried it. it works. i took only the example function. i turned it into a sub that takes two string parameters. one constant and the other which has to be allocated before it's called. then always wrote into the return string with "sprintf" function from c. for windows just write "fail" as return value if it failed. for systems other than windows just write "stat" as return value if it failed.
it's funny that a solution is provided with a function microsoft had obsoleted. also not using _readfile$ to read back the temporary file. even though it's a pain after that to use instr on the acquired file contents to home in on the desired value.
That makes no sense. I can do it from vbscript, VBA, PowerShell. I shouldn't have to resort to C to retrieve a file modified date.