Jump to content
Sign in to follow this  

Running Windows Commands

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?



Share this post

Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...