Jump to content

Running Windows Commands


Otte
 Share

Recommended Posts

I am trying to run some Windows commands within a script to delete files but it seems to be failing for some reason. My code looks like this

RunWait(@ComSpec & " /c " & 'del test.zip')

I am running the script from the same directory where the file is located and if I run the command from cmd.exe then the file gets deleted. I am running this on Windows 2003 64 bit version which may have something to do with it as the code works on a 32 bit 2003 server.

I have added Message boxes to try and find out what error is that the command gives but only get a 1 as the result code. Is there a way to see the error or write the error to file that the command outputs?

Regards

Otte

Link to comment
Share on other sites

  • Developers

Is there a way to see the error or write the error to file that the command outputs?

RunWait(@ComSpec & ' /k del test.zip')

:shocked:

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

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...