home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
scripts
/
ckermit
/
rename
< prev
next >
Wrap
Text File
|
2000-01-02
|
421b
|
13 lines
#!/usr/local/bin/kermit
#
# Renames all *.ksc files in the current directory to *.kds
# Analogous to the UNIX shell "for i in * do; <commands>; done" loop.
#
# Illustrates:
# . FOR loop consruction
# . Using \ffiles() to expand wildards and assign file list to an array
# . Using \fstripx() to remove the "filetype" part of a filename
#
for \%i 1 \ffiles(*.ksc,&a) 1 { rename /v \&a[\%i] \fstripx(\&a[\%i]).kds }
exit