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

Possibly Related Threads…
Thread Author Replies Views Last Post
  Font Size in Threads Dimster 5 377 12-12-2025, 04:49 PM
Last Post: Dimster
  auto-detecting screen resolution for optimal window size on non-Windows systems madscijr 11 1,084 11-10-2025, 07:23 PM
Last Post: madscijr
  auto-detecting screen resolution for optimal window size on non-Windows systems madscijr 0 227 10-26-2025, 06:58 PM
Last Post: madscijr
  question on determining time spent in area fistfullofnails 9 845 08-25-2025, 01:55 PM
Last Post: fistfullofnails
  Testing against multiple elements at a time without select case CMR 4 842 04-17-2025, 02:16 AM
Last Post: CMR

Forum Jump:


Users browsing this thread: 1 Guest(s)