Search for file using WiseScript
|Article:HOWTO1356|||||Created: 2005-12-21|||||Updated: 2008-05-08|||||Article URL http://www.symantec.com/docs/HOWTO1356|
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:
- Add a Search for file TEST.txt place in Variable FOUND. Select Return first File that matches from the Return Type drop-down.
- Add an If statement that checks to see if FOUND is populated with a value.
- Use a Delete Files action to delete the file.
If FOUND Not Equal "" then
Delete File(s) %FOUND%
Article URL http://www.symantec.com/docs/HOWTO1356