Search for file using WiseScript

Article:HOWTO1356  |  Created: 2005-12-21  |  Updated: 2008-05-08  |  Article URL
Article Type
How To

How do I search for a file on the destination computer and delete it if it is found?


Using WiseScript, create a script using the Search For action which locates and then deletes the file in question using a Delete Files action:

  1. Add a Search for file TEST.txt place in Variable FOUND. Select Return first File that matches from the Return Type drop-down. 
  2. Add an If statement that checks to see if FOUND is populated with a value.
  3. Use a Delete Files action to delete the file.

    If FOUND Not Equal "" then
       Delete File(s) %FOUND%

Legacy ID


Article URL

Terms of use for this information are found in Legal Notices