Jump to content

Delete a file with autoit


acrane76
 Share

Recommended Posts

  • Developers
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

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 by OldGuyWalking
Confusion.
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...