DaLiMan Posted September 30, 2004 Posted September 30, 2004 Hi, I'm trying to make a script which copies a file to a shared folder and rename it. But copying the file work OK, but renaming is a different story. Here's what I have:$message = "VCGgui file installer op S:\" $var = FileOpenDialog($message, "P:\ProgsToRun\AutoIt\AutoIt-scripts\VCG\Output\", "Executables (*.exe)", 1 ) FileCopy($var, "S:\Daniel\VCG\",1) Run(@ComSpec & " /c rename " & "S:\Daniel\VCG\"& $var & " SetupVCG.exe", "", @SW_HIDE) Can someone tell me what I'm doing wrong?
MHz Posted September 30, 2004 Posted September 30, 2004 Try this, just change your last line alttle. $message = "VCGgui file installer op S:\" $var = FileOpenDialog($message, "P:\ProgsToRun\AutoIt\AutoIt-scripts\VCG\Output\", "Executables (*.exe)", 1 ) FileCopy($var, "S:\Daniel\VCG\",1) Run(@ComSpec & " /c rename S:\Daniel\VCG\" & $var & " SetupVCG.exe", "", @SW_HIDE)
Matt @ MPCS Posted September 30, 2004 Posted September 30, 2004 Why not just have the FileCopy function rename it? $message = "VCGgui file installer op S:\" $var = FileOpenDialog($message, "P:\ProgsToRun\AutoIt\AutoIt-scripts\VCG\Output\", "Executables (*.exe)", 1 ) FileCopy($var, "S:\Daniel\VCG\SetupVCG.exe",1) I am pretty sure that should work. Hope this helps! *** Matt @ MPCS
DaLiMan Posted September 30, 2004 Author Posted September 30, 2004 Try this, just change your last line alttle.No,Won't work...
DaLiMan Posted September 30, 2004 Author Posted September 30, 2004 Why not just have the FileCopy function rename it?I am pretty sure that should work. Hope this helps!*** Matt @ MPCS<{POST_SNAPBACK}>Yep,Thanks Matt.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now