Search for file using WiseScript

Article:HOWTO1356  |  Created: 2005-12-21  |  Updated: 2008-05-08  |  Article URL http://www.symantec.com/docs/HOWTO1356
Article Type
How To



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

Answer

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%
    End

Legacy ID



17226


Article URL http://www.symantec.com/docs/HOWTO1356


Terms of use for this information are found in Legal Notices