home *** CD-ROM | disk | FTP | other *** search
- # Move doc files from tar file to !tcldoc
-
- #puts "Input directory?"
- #gets stdin in
-
- set in "SCSI::Part2.$.Downloads.tcl74tar.tcl7/4.doc"
- set out "SCSI::Part0.$.TclDist.!tcldoc.doc"
-
- proc move {ext dir}\
- { global in out
- set n [expr [string length $ext]+2]
- set files [glob $in.*/$ext]
- set leaves ""
- foreach f $files \
- { lappend leaves [string range $f 0 [expr [string length $f]-$n]]
- }
- foreach l $leaves \
- { set s "copy $in.$l/$ext $out.$dir.$l ~CV"
- puts $s
- system $s
- }
- }
-
- move n Tcl
- move 3 C
-