|
|
#1 |
|
Junior Member
Join Date: Jul 2004
Location: Somewhere
Posts: 8
|
CopyFiles
Hi there,
can anyone help me with a tricky problem. I'm using CopyFiles to copy approx 4.2GB of data from a DVD. The actual process completes properly (I can check each file that has been copied and it is a perfect copy of the original DVd copy), but the error flag is always set (so im always notified of the error... This is my code: Section "CopyData1" copy: CreateDirectory "$INSTDIR\Data\VTL" CopyFiles "$EXEDIR\VTL_DVD1\*.*" "$INSTDIR\Data\VTL" IfErrors error doneIt ; Check if there has been an error - if yes prompt error: MessageBox MB_OK|MB_ICONSTOP "Error!" MessageBox MB_YESNO|MB_ICONQUESTION "Do you wish to retry the transfer process?" IDYES copy Abort doneIt: SectionEnd Anyone got any ideas?? |
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Jan 2004
Location: London, Ontario, Canada
Posts: 272
|
Here's a straw....Perhaps the directory already existed so the createdirectory functions error flag was set?
|
|
|
|
|
|
#3 | |
|
Junior Member
Join Date: Jul 2004
Location: Somewhere
Posts: 8
|
Quote:
|
|
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Jan 2004
Location: London, Ontario, Canada
Posts: 272
|
Hmm, perhaps the dialog that appears when you don't use /SILENT is causing the error flag to be set since you didn't supply the size in kb.
Try placing an iferror every other line, so we can determine where it is being set. (You'll need a custom error for each one) P.S. don't forget to place one right after the section command, so we know a previous section or function didn't set it. |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Apr 2004
Posts: 130
|
The error may not be coming from your CopyFiles at all. I don't see it in your trimmed down script so you might try adding "ClearErrors" before your CopyFiles just to make sure the error flag wasn't set for something earlier.
|
|
|
|
|
|
#6 |
|
Forum King
|
apart from your problem:
as you said you're copying 4.2GB of files, you might wanna use a macro to copy the files, which checks if copying for each file was successful. otherwise if you have one mistake, you will have to copy the entire 4.2GB again. Winamp: Fossil 2002 III | My AVS Presets | visboTVisbot | PimpBot | How to setup AVS? NSIS: Sublime Text Packages | NSIS-Linker.user.js | highlight.js | Icons & Graphics | Twitter |
|
|
|
|
|
#7 |
|
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,220
|
BTW how SHFileOperation handles "*.*" notation? Can it lost files without extensions ?
|
|
|
|
|
|
#8 |
|
Junior Member
Join Date: Jul 2004
Location: Somewhere
Posts: 8
|
Hi guys,
thanks for all the help so far. ClearErrors seems to be doing the job |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|