erikson Posted April 21, 2007 Share Posted April 21, 2007 how i can search in a folder for a specific file, and if i find it , delete it ? Link to comment Share on other sites More sharing options...
MHz Posted April 21, 2007 Share Posted April 21, 2007 (edited) If you know the file name and where it is then just FileDelete(). If you want to step through the files with a wildcard name the FileFindFirstFile() and FileFindNextFile can help you there. Also using @ComSpec using it's Dir or Del command with StdOut can do it quick and easy. Depends on what your needs are exactly. Edited April 21, 2007 by MHz Link to comment Share on other sites More sharing options...
erikson Posted April 21, 2007 Author Share Posted April 21, 2007 the file is called config.cfg. and it exist in some dirs the problem is that i don`t know exactly in witch folder are. (the parent folder is for example c:\home) Link to comment Share on other sites More sharing options...
MHz Posted April 21, 2007 Share Posted April 21, 2007 If you want to delete any config.cfg files in c:\home and it's subdirs then use this RunWait('"' & @ComSpec & '" /c Del /s/f/q config.cfg', 'c:\home') /s does subdirs.... Use Del /? at a Command Prompt for further help. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now