This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Get file size

Help for those learning Tcl or writing their own scripts.
Post Reply
User avatar
Fire-Fox
Master
Posts: 299
Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null

Get file size

Post by Fire-Fox »

Hey!

How do i get the filesize of a file stored on server?
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

file size "path/to/file"
NML_375
User avatar
Fire-Fox
Master
Posts: 299
Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null

Post by Fire-Fox »

You mean like

Code: Select all

set rawnfo [read $nfofp [file size $nfofile]]
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Assuming $nfofile would be a valid path (including filename) of the file, yes... Though if the sole purpose is to read the contents of the file, just skip the second parameter to read, and it'll read the whole file up until the EOF.

(Though I must advice you, that nfo-files are generally associated with the wares-scene; which is not welcome here..)
NML_375
User avatar
Fire-Fox
Master
Posts: 299
Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null

Post by Fire-Fox »

I know the rules, but is what i have choosen to call it :)
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
Post Reply