acrane76 Posted February 10, 2018 Share Posted February 10, 2018 hello how i can delete a file with autoit in this folder C:\Users\Public\Documents ? Run(@DocumentsCommonDir & "del /F /Q mmr.exe", "", @SW_HIDE) Link to comment Share on other sites More sharing options...
acrane76 Posted February 10, 2018 Author Share Posted February 10, 2018 i have tried this but this does not work Link to comment Share on other sites More sharing options...
Fr33b0w Posted February 10, 2018 Share Posted February 10, 2018 With autoit maybe like this: FileDelete("c:\path_to_a_file") ? Link to comment Share on other sites More sharing options...
Developers Jos Posted February 10, 2018 Developers Share Posted February 10, 2018 53 minutes ago, acrane76 said: i have tried this but this does not work Makes sense because when you concatenate @DocumentsCommonDir & "del /F /Q mmr.exe" you will miss an "\" between the directory and del. Normally you would do: run(@ComSpec & " /c del /F /Q mmr.exe", "", @SW_HIDE) You need to make sure you have the cottect working dir! Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
acrane76 Posted February 10, 2018 Author Share Posted February 10, 2018 i want to delete this file only from this folder C:\Users\Public\Documents how i can do this ? Link to comment Share on other sites More sharing options...
OldGuyWalking Posted February 11, 2018 Share Posted February 11, 2018 (edited) You might want to take a look at the AutoIt help. Click on the Contents tab. Then look for the File, Directory, and DiskManagement heading in the tree on the right, wait... left (unless you're not facing the screen then it would be on your right). Then, click on that File, Directory, and Disk Management heading and it will show you functions that will let you Create Files and Folders. Delete Files and Folders. Plus lots more. It's cool... But in case you don't have time.... FileDelete("C:\Users\Public\Documents\mmr.exe") Good Luck. Edited February 11, 2018 by OldGuyWalking Confusion. 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