Sign in to follow this  
Followers 0
Moonwaltz

Having Trouble Copying Files

3 posts in this topic

here is what I have

; START SCRIPT

;COPY FILES

;COPY PAL INI OVER ORIGINAL

FILECOPY("%0\..\PAL.INI", "C:\PROGRAM FILES\PAL\", 1)

; COPY VPN IMAGES

filecopy("%0\..\*.bmp", "C:\PROGRAM FILES\NORTEL NETWORKS\ICONS\", 1)

; START CYBER ARMOR CHANGES

; COPY SETTINGS FILES

filecopy("%0\..\pcarm.ini", "C:\Program Files\CyberArmor\", 1)

filecopy("%0\..\pcarmrt.ini", "C:\Program Files\CyberArmor\", 1)

; FINISHED WITH CYBER ARMOR

the PAL ini copies but nothing else does, I have the script and all files in one folder that I'm pushing to a machine then executing the script from there.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Just a guess of your intentions.

; START SCRIPT

;COPY FILES

;COPY PAL INI OVER ORIGINAL
FILECOPY(@ScriptDir & "\..\PAL.INI", @ProgramFilesDir & "\PAL\", 1)

; COPY VPN IMAGES
filecopy(@ScriptDir & "\..\*.bmp", @ProgramFilesDir & "\NORTEL NETWORKS\ICONS\", 1)

; START CYBER ARMOR CHANGES

; COPY SETTINGS FILES
filecopy(@ScriptDir & "\..\pcarm.ini", @ProgramFilesDir & "\CyberArmor\", 1)
filecopy(@ScriptDir & "\..\pcarmrt.ini", @ProgramFilesDir & "\CyberArmor\", 1)

; FINISHED WITH CYBER ARMOR

%0 is used in DOS batch files for the equivalent of @ScriptName. %0 means little in Autoit.

Edit: Added @ProgramFilesDir macro to code.

Edited by MHz

Share this post


Link to post
Share on other sites

I had two problems the first was %0 the second was the files I was overwriting were read only. I added setFileSetAttrib lines for them and now all is well.

Thanks

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  
Followers 0