Jump to content
Sign in to follow this  
Jewtus

running command copy with @scriptdir

Recommended Posts

I'm trying to execute a copy statement from in my script (basically I'm using it to concatenate all the text files in a folder)

When I give the explicit path it works, but when I try to use @scriptdir it doesn't

RunWait('"' & @ComSpec & '" /c copy C:\Automation\AutoIt\db\log\*.txt C:\Automation\AutoIt\db\log\outfile.csv', '', @SW_HIDE)

When I try to use

RunWait('"' & @ComSpec & '" /c copy '&@ScriptDir"\db\log\*.txt "&@ScriptDir"\db\log\merged.csv"&', '', @SW_HIDE)

it errors. 

 

I've been trying to figure out a simple way of doing this and I even tried this:

$CMDLINE[copy @ScriptDir&"\db\log\*.txt" @ScriptDir&"\db\log\output.csv"]

but I seem to be missing something. 

Any suggestions?

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  

×
×
  • Create New...