Jump to content
Sign in to follow this  
etirta

DirCopy

Recommended Posts

etirta

When performing DirCopy(), if there is an error copying 1 file, then the function will simply stop and return. The problem is some times when performing this, one of the file under the folder is being locked and can't be copied. There should be a flag in DirCopy() to ignore error copying a file and continue until the it finished.

Any suggestion on how for me to do it?

BR //Edo

Share this post


Link to post
Share on other sites
Dead

I have had this problem the solution i used was

#include <Array.au3>

local $FolderArray = _FileListToArray(@MyDocumentsDir & "\", "*", 2)

    $1 = _ArraySearch($FolderArray, "RECYCLER")
    _ArrayDelete($FolderArray, $1)
    $Num = $FolderArray[0]
    $FolderArray[0] = $Num - 1

What this does it gets all of the folders From My Documents and puts them in to an Array

then it searches the array and removes the folder "RECYCLER" and removes 1 from Array[0]

Edited by Dead

Share this post


Link to post
Share on other sites
PsaltyDS

When performing DirCopy(), if there is an error copying 1 file, then the function will simply stop and return. The problem is some times when performing this, one of the file under the folder is being locked and can't be copied. There should be a flag in DirCopy() to ignore error copying a file and continue until the it finished.

Any suggestion on how for me to do it?

BR //Edo

Run() or RunWait() with an XCOPY command line including the "/C" switch. I use XCOPY with "/D/E/V/C/Y" switches for most of my mass-copies.

muttley


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

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  

×