Sign in to follow this  
Followers 0
sweborn

Filecopy

3 posts in this topic

Can you help me. I want to copy some files to another directory but the files should not be overwritten and i dont want a dialog box to pop up. The script should only copy the files that are not in the destination folder without any question. Is this possible?

Share this post


Link to post
Share on other sites



Yes it is possible.

Look at FileCopy() in the helpfile (comes with AutoIt installation). FileExists() might help you some too... Or perhaps FileMove()

Specifically look at the advanced options in FileCopy. There you can choose if you want to overwrite or not.

Welcome to the AutoIt forums!


My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

Share this post


Link to post
Share on other sites

Yes, it is in the help file, look for filecopy

FileCopy ( "source", "dest" [, flag] )

flag

[optional] this flag determines whether to overwrite files if they already exist.

Can be a combination of the following:

0 = (default) do not overwrite existing files

1 = overwrite existing files

8 = Create destination directory structure if it doesn't exist (See Remarks).

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