Sign in to follow this  
Followers 0
Gremlin

File copy issue

6 posts in this topic

This is my first entry into the forum, so go easy if i've made a basic mistake. I'm trying to copy files from a cd to a directory on a client. I'm using 'FileCopy' to do this but it only seems to copy one of the files instead of the multiple files which are in the source directory, heres the section i'm having the issue with.

SplashTextOn ( "Apps Move", "Copying Application Forms. Please wait, this may take some time")

FileCopy ("D:\forms\apps\*.*", "c:\trigold\apps\",1)

FileSetAttrib("C:\trigold\apps", "-R")

The c:\trigold\apps directory already exists on the client. Apologies in advance if this is just a newbie mistake, i've checked it in the help file and it seems okay?

Any ideas?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Any ideas?

<{POST_SNAPBACK}>

FileCopy() has the limitation that when it encounters an error the copy process will stop. Could it be that a file to be copied already exists in the target directory and is in use or read-only ? Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

May be one of your files just can be read only

Edited by konan

Share this post


Link to post
Share on other sites

FileCopy() has the limitation that when it encounters an error the copy process will stop. Could it be that a file to be copied already exists in the target directory and is in use or read-only ?

<{POST_SNAPBACK}>

Quality. I've just deleted the contents from the target folder and it worked fine. Most lilkely a 'in use' issue. Will have to do some investigating.

Thanks Muchly

Gremlin

Share this post


Link to post
Share on other sites

Where are you from?

Share this post


Link to post
Share on other sites

Newcastle, UK.

I've just set a fileattrib to set all the files in the target directory to be writeable (which they should be anyway). This has sorted it. Its working everytime now.

Cheers lads.

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