Sign in to follow this  
Followers 0
dkwokgs

Filecopy does not copy the rest of the files on the 2nd run

3 posts in this topic

Hi There,

I did a filecopy(w/o overwrite - see attached) from src to destination, it works for the 1st time (all file went through). I deleted one file in the destination and ran the script again but nothing was copied over! Why?

Please advise.

FileCopy("c:\test1\*.doc","C:\test2\")

Share this post


Link to post
Share on other sites



from the helpfile

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

Parameters

source The source path of the file(s) to copy. Wildcards are supported.

dest The destination path of the copied file(s).

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

you need to FileCopy("c:\test1\*.doc","C:\test2\",1)


010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Hi,I do not want to overwrite existing file. I only to copy what is not in destination from source but when I delete a file in destination and ran the script again it does not copy any files to the destination.

from the helpfile

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

Parameters

source The source path of the file(s) to copy. Wildcards are supported.

dest The destination path of the copied file(s).

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

you need to FileCopy("c:\test1\*.doc","C:\test2\",1)

Edited by dkwokgs

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