Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - Copy one file type from entire directory?

Reply
 
Old 10-22-2008   #1 (permalink)
D.P. Roberts


 
 

Copy one file type from entire directory?

I've been racking my brains over this one - seems like it should be so easy
but I haven't been able to do it using copy, xcopy, or anything else.

I need to copy all .html files within a directory and its subdirectories.
Anyone know how to do this in vbs or from a command prompt?

Thanks.


My System SpecsSystem Spec
Old 10-22-2008   #2 (permalink)
Pegasus \(MVP\)


 
 

Re: Copy one file type from entire directory?


"D.P. Roberts" <dproberts@xxxxxx> wrote in message
news:%2345tnaJNJHA.468@xxxxxx
Quote:

> I've been racking my brains over this one - seems like it should be so
> easy but I haven't been able to do it using copy, xcopy, or anything else.
>
> I need to copy all .html files within a directory and its subdirectories.
> Anyone know how to do this in vbs or from a command prompt?
>
> Thanks.
How about this command?
xcopy /s /c /y "c:\My Files\*.html" "c:\My Destination\"

Type xcopy /? at the Command Prompt to see its many switches.


My System SpecsSystem Spec
Old 10-22-2008   #3 (permalink)
D.P. Roberts


 
 

Re: Copy one file type from entire directory?

Thank you Pegasus! I had tried many variations of xcopy commands, but didn't
realize I needed the /s parameter.


"Pegasus (MVP)" <I.can@xxxxxx> wrote in message
news:%23e10ifJNJHA.4240@xxxxxx
Quote:

>
> "D.P. Roberts" <dproberts@xxxxxx> wrote in message
> news:%2345tnaJNJHA.468@xxxxxx
Quote:

>> I've been racking my brains over this one - seems like it should be so
>> easy but I haven't been able to do it using copy, xcopy, or anything
>> else.
>>
>> I need to copy all .html files within a directory and its subdirectories.
>> Anyone know how to do this in vbs or from a command prompt?
>>
>> Thanks.
>
> How about this command?
> xcopy /s /c /y "c:\My Files\*.html" "c:\My Destination\"
>
> Type xcopy /? at the Command Prompt to see its many switches.
>
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Read a line from a text file, without loading the entire file inmemory PowerShell
You need permission to perform this action!! to copy a file to a directory with Admin rights Vista security
Display actual file type, not description of the type Vista file management
How to copy file to top level directory Vista General
Installing an Application copies entire CD to temp directory Vista performance & maintenance


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46