mIRC Home    About    Download    Register    News    Help

Print Thread
#217332 08/01/10 09:15 PM
Joined: Dec 2008
Posts: 1,515
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
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


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
westor #217333 08/01/10 09:18 PM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
Look at $file() and $bytes()


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Dec 2008
Posts: 1,515
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
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 }

Last edited by westor; 08/01/10 09:24 PM.

Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
westor #217336 08/01/10 09:25 PM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
$file().size returns the size in bytes. You can use $asctime() to convert $file().atime to a human-readable value.

westor #217337 08/01/10 09:27 PM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
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.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Collective #217338 08/01/10 09:27 PM
Joined: Dec 2008
Posts: 1,515
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
can you give me an example how can i convert from bytes to kilobytes? or the .mtime / .atime prop ?

Last edited by westor; 08/01/10 09:28 PM.

Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
westor #217339 08/01/10 09:32 PM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
$bytes($file($script).size).suf

$asctime($file($script).mtime)

Collective #217340 08/01/10 09:36 PM
Joined: Dec 2008
Posts: 1,515
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Thanks


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-

Link Copied to Clipboard