Go Back   FlashFXP Forums > >

Programming Need help with C/C++/Delphi? Ask here and make us all laugh.

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 05-27-2005, 11:55 AM   #3
tuff
Senior Member
FlashFXP Registered User
ioFTPD Scripter
 
Join Date: Jan 2003
Posts: 277
Default

set srcpath [resolve pwd $pwd$release]
set nesting 3
set knownfiles 0
set knowndirs 0
set subdir "*"
set sizeneeded 0

for {set level 0} {$level < $nesting} {incr level} {
set test [glob -nocomplain -directory $srcpath "$subdir"]
foreach dir $test {
if {[file isdirectory "$dir"]} {
lappend dirs "$dir "
incr knowndirs
} else {
if {![string match -nocase "*/.*" $dir]} {
incr knownfiles
}
}
set sizeneeded [expr [expr $sizeneeded + [file size $dir]] * 1.0]
}
append subdir "/*"
}
set sizeneeded [expr [expr $sizeneeded / 1024] * 1.0]

this is basically what i use in ioPRE to check for enough free space
in a destination path before `pre`, i guess you can work out the rest
__________________
#iotools #ioftpd (both on efnet)
tuff is offline  
 

Tags
access, files, size, task, tcl


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 03:24 PM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)