Tuesday, October 11, 2011

How to delete multiple files using TCL?

In TCL, deleting a single file is easy, just type:
file delete filename
However, if you want to delete hundreds of lines, simply typing file delete filenames* does not work. Instead, I found the following to work:
eval file delete [glob filenames*]

6 comments:

  1. Was not able to get the above scripts to work, but the following script I was able to get all .txt files to delete. Just have to change the extension for the file type.

    eval file delete [glob nocomplain *.txt]

    ReplyDelete
  2. eval file delete -force [glob ./ip/*]

    worked for me to delete several non-empty directories.

    ReplyDelete
  3. Using Duplicate FIles Deleter can help you

    ReplyDelete
  4. You can do this with Duplicate Files Deleter

    ReplyDelete