| View previous topic :: View next topic |
| Author |
Message |
thomas Newbie
Joined: 15 Jan 2003 Posts: 23 Location: Germany
|
Posted: Wed Jan 29, 2003 8:42 am Post subject: verify file copy |
|
|
Hello,
I want to verify the copy step of a file. I use "file copy,source_file,target_file".
The Problem is if a file cannot be copy (because the target drive is full), my script continue with the next file and get the next windows error.
Is it possible to verify the copy step by vds script, or to get the error code from windows?
Thanks!!
Thomas |
|
| Back to top |
|
 |
MarkTrubo Contributor


Joined: 27 May 2001 Posts: 148 Location: Long Island, NY
|
Posted: Wed Jan 29, 2003 11:42 am Post subject: |
|
|
Just check for the file after the copy, like this:
:FILECOPY1
FILE COPY,source_file,target_file
IF @FILE(c:\target_file)
GOTO FILECOPY2
END
WARN Yo Thomas! File c:\target_file does not exist!
:FILECOPY2 |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Wed Jan 29, 2003 1:40 pm Post subject: |
|
|
Or you can use File Copy,source_file,target_file,SHOWERRORS
Just a thought ya know  _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Wed Jan 29, 2003 5:35 pm Post subject: |
|
|
Or ya can check if there's room first...
___________________________________________________________________________________________
| Code: |
rem -- Get file size (bytes) and convert @volinfo (drive C - free space) to bytes --
if @greater(@file(source_file, Z), @fmul(@volinfo(C, F), 1024))
WARN Not enough room for file!
end
|
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
MarkTrubo Contributor


Joined: 27 May 2001 Posts: 148 Location: Long Island, NY
|
Posted: Wed Jan 29, 2003 7:20 pm Post subject: |
|
|
| I love multiple solutions! I did not think of the last two! |
|
| Back to top |
|
 |
|