Re: CopyHere
- From: "Al Dunbar" <alandrub@xxxxxxxxxxx>
- Date: Wed, 19 Aug 2009 17:45:32 -0600
"James" <dontemailme@xxxxxxxxxxxxxxx> wrote in message news:ObwadLRIKHA.3000@xxxxxxxxxxxxxxxxxxxxxxx
This is what I had...
On Error Resume Next
If Err.Number <> 0 Then
msgbox Err.Number
msgbox Err.Description
End If
If an error occurred before the above block of code, and if no previous on error resume next was in effect, the above code would never execute, as the script would abort with an error message.
If an error did not occur before the above block of code, I am not sure what error condition would be displayed here.
/Al
"Eric" <someone@xxxxxxxxxxxxxxxxx> wrote in message news:uByyApPIKHA.1336@xxxxxxxxxxxxxxxxxxxxxxxWhat sort of error checking gives a message of "450"?
Normally if you want to continue on error and see what the error was you do:
On Error Resume Next
' do something which crashes sometimes
If Err.Number <> 0 Then
Wscript.Echo Err.Description
End If
"James" <dontemailme@xxxxxxxxxxxxxxx> wrote in message news:eO992kPIKHA.1988@xxxxxxxxxxxxxxxxxxxxxxxYou're my savior Eric...LOL
I have definately shown my newbness, but thanks for reading between the lines and teaching me the answer to what seems to be such an easy answer now. I tried adding the error checking but all it did was give me the 450 error number, and not much I could do with that since I didn't know what to do in the first place.
Thanks a ton Eric!
James
"Eric" <someone@xxxxxxxxxxxxxxxxx> wrote in message news:er3n1HPIKHA.1340@xxxxxxxxxxxxxxxxxxxxxxxIf you can specify more than one at a time, you don't pass them as separate parameters. You have to combine them.
If you want option 8 and option 16 you pass value 24 not 8,16.
This is why the option values are multiplied numbers.
"James" <dontemailme@xxxxxxxxxxxxxxx> wrote in message news:eLMw0ZOIKHA.3444@xxxxxxxxxxxxxxxxxxxxxxxThe following options work...but I cannot use specify more than one at a time or the complete copy will fail. Anyone know why?
Const FOF_NOCONFIRMATION = &H10& '(16)Respond with "Yes to All" for any dialog box that is displayed
Const FOF_SIMPLEPROGRESS = &H100& '(256)Display a progress dialog box but do not show the file names
Const FOF_NOCONFIRMMKDIR = &H200& '(512)Do not confirm the creation of a new directory if the operation requires one to be created
objSHApp.Namespace(strDest).CopyHere strSrcFavs,FOF_NOCONFIRMATION,FOF_SIMPLEPROGRESS,FOF_NOCONFIRMMKDIR
James
"Eric" <someone@xxxxxxxxxxxxxxxxx> wrote in message news:eHK7rHEIKHA.1340@xxxxxxxxxxxxxxxxxxxxxxxMS says CopyHere has options.
http://msdn.microsoft.com/en-us/library/bb787866(VS.85).aspx
I execute it with options and it ignores them. Am I missing something or is MS missing something?
.
- References:
- CopyHere
- From: Eric
- Re: CopyHere
- From: James
- Re: CopyHere
- From: Eric
- Re: CopyHere
- From: James
- Re: CopyHere
- From: Eric
- Re: CopyHere
- From: James
- CopyHere
- Prev by Date: Re: Reading A Text File
- Next by Date: Re: Log in to server using current username/pwd
- Previous by thread: Re: CopyHere
- Next by thread: Re: CopyHere
- Index(es):
Relevant Pages
|