Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to get a file's modified date/time and size in bytes?
#27
(05-03-2025, 03:51 AM)madscijr Wrote:
(05-03-2025, 01:59 AM)hsiangch_ong Wrote: thank you to @spriggsyspriggs and gpt.

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.
You're telling me that to get a file's modified date from BASIC we have to do it in C? 
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.
You don't need 'C' to get the file modified date/time stamp if you use the Whereis utility which I posted above..
Reply


Messages In This Thread
RE: how to get a file's modified date/time and size in bytes? - by eoredson - 05-03-2025, 04:10 AM



Users browsing this thread: 3 Guest(s)