forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


verify file copy

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
thomas
Newbie


Joined: 15 Jan 2003
Posts: 23
Location: Germany

PostPosted: Wed Jan 29, 2003 8:42 am    Post subject: verify file copy Reply with quote

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
View user's profile Send private message
MarkTrubo
Contributor
Contributor


Joined: 27 May 2001
Posts: 148
Location: Long Island, NY

PostPosted: Wed Jan 29, 2003 11:42 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Wed Jan 29, 2003 1:40 pm    Post subject: Reply with quote

Or you can use File Copy,source_file,target_file,SHOWERRORS
Just a thought ya know Wink

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Wed Jan 29, 2003 5:35 pm    Post subject: Reply with quote

Or ya can check if there's room first... Wink
___________________________________________________________________________________________
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 Smile

_________________
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
View user's profile Send private message Send e-mail
MarkTrubo
Contributor
Contributor


Joined: 27 May 2001
Posts: 148
Location: Long Island, NY

PostPosted: Wed Jan 29, 2003 7:20 pm    Post subject: Reply with quote

I love multiple solutions! I did not think of the last two!
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group