Re: vbs version of DOS xcopy command?
From: Lee C. (ChestnutLee[SpamBlock)
Date: 04/23/04
- Next message: tobin: "sharing a collection between vbsript and vb6"
- Previous message: Robert Cohen: "Re: VBScript book recommendations"
- In reply to: Lee C.: "Re: vbs version of DOS xcopy command?"
- Next in thread: Joe Earnest: "Re: vbs version of DOS xcopy command?"
- Reply: Joe Earnest: "Re: vbs version of DOS xcopy command?"
- Reply: dk1983: "Re: vbs version of DOS xcopy command?"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 23 Apr 2004 09:54:07 -0500
I managed to get both of those to work (from "tomthumbkop" and "dk1983") with some minor problems I had created for myself regarding returned errors caused by filling up H:\ partition trying this trick over and over (fixed by making room on H:\ again so's it could copy).
This points up though how little I know about this vbs stuff. I don't understand why the ", 0, True" extension works, and the ", 2" (or ", 0") extension did not--why the "True" was required? I don't know yet. However, I first learned to do .bat files from a book, 30-40 pages with the commands and switches and explanations of what did what (cryptic, but I puzzled my way through it). I think I could benefit from the same sort of basic education on VBS stuff, what are the commands, switches, what does what?
Are there any such resources available on the web? Will I need to go to the computer store and buy a book? Any titles anybody wants to recommend to a beginner?
Thanks guys for the help so far.
"Lee C." <ChestnutLee[SpamBlock]@hotmail.com> wrote in message news:uYgm8ITKEHA.1392@TK2MSFTNGP09.phx.gbl...
Well, that didn't work for me for reasons I've not yet come to understand. I did get it to work with:
WSHShell.Run "xcopy d:\files\*.* h:\files /d /s /h /r /k /y /i"
However, that also causes the screen to go black and go to the DOS xcopy running copies, doesn't seem to be any way to minimize or hide the screen (doesn't for example pay any attention to a ", 2" extension, so the following does NOT get it to make the copies while reduced to a button on the taskbar:
WSHShell.Run "xcopy d:\files\*.* h:\files /d /s /h /r /k /y /i", 2
I figure this means I'm obviously going about this the wrong way from the inception of my plan, and need a new plan.
What's the best way to get a vbs file to copy (and overcopy, i.e. replace) files changed over the last 24 hours from e.g. D:\FILES\ to H:\FILES\, (including subdirectories) and not have it start running full screen, and not have take over my screen when the task scheduler starts it up?
TIA.
"sekio" <anonymous@discussions.microsoft.com> wrote in message news:F4B72BE0-2A16-42E4-B1B8-F31DFB1642DD@microsoft.com...
> shell "xcopy d:\files\*.* h:\files /d /s /h /r /k /y /i"
- Next message: tobin: "sharing a collection between vbsript and vb6"
- Previous message: Robert Cohen: "Re: VBScript book recommendations"
- In reply to: Lee C.: "Re: vbs version of DOS xcopy command?"
- Next in thread: Joe Earnest: "Re: vbs version of DOS xcopy command?"
- Reply: Joe Earnest: "Re: vbs version of DOS xcopy command?"
- Reply: dk1983: "Re: vbs version of DOS xcopy command?"
- Messages sorted by: [ date ] [ thread ]