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?
#10
(05-22-2024, 05:04 PM)SpriggsySpriggs Wrote: I guess I'm going to have to become the old geezer who complains that everyone is ruining hard drives with temp files constantly.
Ha! 

Well in this case I was looking to see if a file changed on disk, and only access it if it changed. 
I figured looking at the timestamp and size in bytes are a good way to tell. 
The problem with using this SHELL method that creates a file is, it requires at least 3 disk accesses: 
  1. one to read the attributes
  2. one to write them to a temp file, and 
  3. one to read that file 
  4. (and another if we want to delete the temp file)

Not too efficient. For a lot of cases that might not be a big deal, but for what I'm doing, it would slow things down a lot.

We have a thread somewhere to suggest new commands for QB64PE, right? Where can I suggest adding some built-in cross-platform commands to get a file's date / size / attributes (& maybe update them as well)?
Reply


Messages In This Thread
RE: how to get a file's modified date/time and size in bytes? - by madscijr - 05-22-2024, 06:20 PM



Users browsing this thread: 1 Guest(s)