home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / ckscripts / rename < prev    next >
Text File  |  2020-01-01  |  421b  |  13 lines

  1. #!/usr/local/bin/kermit
  2. #
  3. # Renames all *.ksc files in the current directory to *.kds
  4. # Analogous to the UNIX shell "for i in * do; <commands>; done" loop.
  5. #
  6. # Illustrates:
  7. #  . FOR loop consruction
  8. #  . Using \ffiles() to expand wildards and assign file list to an array
  9. #  . Using \fstripx() to remove the "filetype" part of a filename
  10. #
  11. for \%i 1 \ffiles(*.ksc,&a) 1 { rename /v \&a[\%i] \fstripx(\&a[\%i]).kds }
  12. exit
  13.