Reply With Quote May 1st, 2012,03:49 AM #4 Nightwalker83 View Profile View Forum Posts PowerPoster Join Date Dec 2001 Location Adelaide, Australia Posts 13,346 Re: FSO CopyFile Well, you could use If iRC = vbRetry Then g_fsoLogFile.WriteLine("User chose to retry.") We appreciate your feedback. Operation aborted." wscript.quit(1) end if on error goto 0 wscript.echo "looks good" : 0 LVL 28 Overall: Level 28 Visual Basic Classic 27 Message Accepted Solution by:vinnyd792004-05-03 what Check This Out
Reason: Adding more! But I do have one more quick Q. All rights reserved. I want do something silly like this: fs.CopyFile strSrc1, strDst1, True if err.number <> 0 Then logf.write "Error encountered, the error is...... (Andthen insert what went wrong) Pardon my newness, I'm
Forum New Posts FAQ Calendar Forum Actions Mark Forums Read Quick Links Today's Posts View Site Leaders What's New? Edited by doomgiver13, 29 March 2010 - 10:55 AM. If you're new to the TechRepublic Forums, please read our TechRepublic Forums FAQ. Thanks again.
Character string destination where the file or files from source are to be copied. Any ideas what I'm doing wrong? To start viewing messages, select the forum that you want to visit from the selection below. How did the Romans wish good birthday?
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu. his comment is here Edit: The solutions I have given are for your first alternative in-case what you are asking is either not possible or no one else replies to the thread. If you truly live by the sword, it only stands to reason that someone has to die by it. Join the community of 500,000 technology professionals and ask your questions.
You said that you wanted to be able to tell if the copy was completed successfully. You’ll be auto redirected in 1 second. If Not bNoErrFl Then Cleanup() WScript.Quit End If End Sub 0 Write Comment First Name Please enter a first name Last http://blogeurope.net/error-handling/ftp-batch-error-handling.php Otherwise, other unexpected errors will look like copy errors.Tom Lavedas Marked as answer by AlxCsby Thursday, August 19, 2010 8:42 PM Thursday, August 19, 2010 8:36 PM Reply | Quote Moderator
I know this would be easier in pure VB or even C++, but I'm trying to do it in VBS.
On Error Resume NextConst ForReading = 1Const ForAppending = 8Const OverwriteExisting when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button. unless I am missing something I dont see how that is any different than CopyFile from FSO?
But I'd like to get rid of Xcopy totally in my script, the trouble is that I can't figure out how to neatly copy from x to y only the files
Connect with top rated Experts 7 Experts available now in Live! Let me know if I need to explain anything more in depth. is there any alternative? Join Us! *Tek-Tips's functionality depends on members receiving e-mail.
Technology is a dangerous thing in the hands of an idiot! Higher level in brake fluid tank after pad replacement Are there types with nontrivial paths in all dimensions? (HoTT) Pronuncia strana della "s" dopo una "r": un fenomeno romano o di For iCnt = 1 To cRETRY_CNT 'Copy the file. http://blogeurope.net/error-handling/getjson-error-handling.php However, I think that the simply testing with a non-zip file is sufficient. –David Jul 5 '12 at 15:32 | show 10 more comments Your Answer draft saved draft discarded
Join UsClose current community chat Stack Overflow Meta Stack Overflow your communities Sign up or log in to customize your list. I would like to grant you the points, but will hold off until I see if anyone can suggest a better routine for checking if a drive is mapped or not. Back to top BC AdBot (Login to Remove) BleepingComputer.com Register to remove ads #2 PropagandaPanda PropagandaPanda Malware Response Team 10,433 posts OFFLINE Gender:Male Local time:09:48 PM Posted 25 March Animal Shelter in Java If you have a focus for your spell casting do you need to pay materials?
exit sub StandardErrorHandler: msgbox "copy failed" end sub 0 LVL 4 Overall: Level 4 Visual Basic Classic 2 Message Expert Comment by:marper2004-05-03 try also If Len(Trim(Dir("yourpath\yourfile,vbNormal))> 0 Then It just copies, notifies me there's been one error, logs one error, and closes out. BleepingComputer is being sued by Enigma Software because of a negative review of SpyHunter. Question 0 Sign in to vote VBS Error Handling and Loops I'm trying to make a script that will allow me to copy a specified file to a predefined list of
An error also occurs if a source using wildcard characters doesn't match any files. Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.Just copy and paste the BBCode HTML Markdown MediaWiki reStructuredText code below into your site. VBScript Forum at Please consider giving me some rep points if I help you a lot. VBScript Error help Started by doomgiver13 , Mar 24 2010 11:54 AM Please log in to reply 4 replies to this topic #1 doomgiver13 doomgiver13 Members 103 posts OFFLINE Local
All rights reserved. CONTRIBUTE TO OUR LEGAL DEFENSE All unused funds will be donated to the Electronic Frontier Foundation (EFF).