Jump to content
Sign in to follow this  
n9mfk9

how to check if a file copied ok

Recommended Posts

n9mfk9

Hi all,

I need some help here is what i have to start with

DirCreate("C:\new")

$test= DirCopy("c:\wdisplay", "C:\new\wd",1)

MsgBox(0,"",$test)

What i am trying to do is find a way to see if each file is copied ok

thanks beau

Share this post


Link to post
Share on other sites
Achilles

Hi all,

I need some help here is what i have to start with

DirCreate("C:\new")

$test= DirCopy("c:\wdisplay", "C:\new\wd",1)

MsgBox(0,"",$test)

What i am trying to do is find a way to see if each file is copied ok

thanks beau

Well, as to what I think, there wouldn't be any possible errors in copying a directory... I don't know any files or file types that can't be copied and if there were some huge files in the directory it would just take a while.

If you really wanted to you could use FileListToArray() then for each file use FileCopy() to move it into the directory then you could check the success for each one the same way you checked in the code you posted.

Edited by Piano_Man

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

Share this post


Link to post
Share on other sites
martin

Hi all,

I need some help here is what i have to start with

DirCreate("C:\new")

$test= DirCopy("c:\wdisplay", "C:\new\wd",1)

MsgBox(0,"",$test)

What i am trying to do is find a way to see if each file is copied ok

thanks beau

If you used FileCopy to copy each file instead of DirCopy then $test would tell you when there was a problem copying a certain file. To go through all the files you would need to use FileFindFirst and FileFindNext.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.