View Single Post
Old 02-28-2005, 03:02 AM  
Harm
Too much time...
 
Join Date: Jul 2003
Posts: 1,430
Default

You could try this.

renameintro.itcl:
Code:
set ri(paths) "/private /groups"

proc renameintro {vfspath path} {
set dirs [glob -nocomplain -type d "$path/*"]
foreach dir $dirs {
	iputs -nobuffer "Checking $vfspath."
	if {![file exists [file join $path ".intro"]]} {
		renameintro "$vfspath/[lindex [split $dir /] end]" "$dir"
	} else {
		catch {file rename -force [file join $path ".intro"] [file join $path ".ioFTPD.message"]}
	}
}
return 0
}

foreach path $ri(paths) {renameintro "$path" "[resolve pwd $path]"}
return 0
ioFTPD.ini:
Code:
[FTP_Custom_Commands]
RENAMEINTO = TCL C:\ioFTPD\scripts\renameintro.itcl

[FTP_SITE_Permissions]
RENAMEINTRO = M
Harm is offline   Reply With Quote