Jump to content
Sign in to follow this  

[solved] FileCopy( )

Recommended Posts

hi I tried to copy a file with the filecopy script but it won'T work. I didn't know why. now i know. can't overwrite the old file. how can i copy a file with overwriting?

my sorce is:

FileCopy(@ScriptDir & "\packages\ac_client.exe", @ScriptDir & "\bin_win32\")

how can i modify it to allow the overwriting?


Edited by Unc3nZureD

Share this post

Link to post
Share on other sites

FileSetAttrib(@ScriptDir & "\bin_win32\ac_client.exe, "-R") ; just to be sure
FileCopy(@ScriptDir & "\packages\ac_client.exe", @ScriptDir & "\bin_win32\",9) ; 1 = overwrite existing files,  8 = Create destination directory structure if it doesn't exist

Edit: flag 9 is better then flag 1.

Edited by KaFu

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...