Jump to content
Sign in to follow this  
whiteCat

Run Dos Command with Var

Recommended Posts

whiteCat

hey,i ve a script ,it needs to run dos command ,but command parameters include some variable ,i found some way from help files ,but the script 's not word still

like this:

Local $var = "D:\1.txt"

Run(@ComSpec & " /c " & "Del"&""&$var , "", @SW_HIDE)

i hope get some help ,thank u

Share this post


Link to post
Share on other sites
KaFu

Your run command results in

delD:\1.txt

Make sure there's a space where needed:

Local $var = "D:\1.txt"
Run(@ComSpec & " /c " & "del " &$var , "", @SW_HIDE)

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  

×