mIRC Homepage
Posted By: westor file kb,mg - 08/01/10 09:15 PM
Hello,

Has anyone anyidea how can i see for any file how much KB or MB or GB is the file, and when it has the last update? for e.g: an .mrc file


thanks
Posted By: starbucks_mafia Re: file kb,mg - 08/01/10 09:18 PM
Look at $file() and $bytes()
Posted By: westor Re: file kb,mg - 08/01/10 09:22 PM
Yes i had a look and when i do it it return an number but what kind of number is , Kilobytes? or Bytes? , also when i use the .atime prop it return me a number how can i get the resault for e.g: 08/01/2010

e.g: alias test { echo -s is: $file($script).size }
Posted By: Collective Re: file kb,mg - 08/01/10 09:25 PM
$file().size returns the size in bytes. You can use $asctime() to convert $file().atime to a human-readable value.
Posted By: starbucks_mafia Re: file kb,mg - 08/01/10 09:27 PM
Well if you run it on $script - (ie. a small text file) and it returns a value in the hundreds or thousands range, logic should narrow it down fairly quickly. In fact, logic should narrow it down regardless.

Plus the second half of my post kind of gives it away.
Posted By: westor Re: file kb,mg - 08/01/10 09:27 PM
can you give me an example how can i convert from bytes to kilobytes? or the .mtime / .atime prop ?
Posted By: Collective Re: file kb,mg - 08/01/10 09:32 PM
$bytes($file($script).size).suf

$asctime($file($script).mtime)
Posted By: westor Re: file kb,mg - 08/01/10 09:36 PM
Thanks
© mIRC Discussion Forums