Windows Vista Forums

Copy one file type from entire directory?
  1. #1


    D.P. Roberts Guest

    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

  2. #2


    Pegasus \(MVP\) Guest

    Re: Copy one file type from entire directory?


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

    > 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

  3. #3


    D.P. Roberts Guest

    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

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

    >> 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

Copy one file type from entire directory? problems?

Similar Threads
Thread Thread Starter Forum Replies Last Post
Create renamed copy of file in same directory Seb PowerShell 7 18 Feb 2010
Copy file from one directory to a new directory, using excelspreadsheet as reference for items to be copied cjake2299 VB Script 2 17 Dec 2009
You need permission to perform this action!! to copy a file to a directory with Admin rights Athena Vista security 2 04 Nov 2007
How to copy file to top level directory Siegfried Heintze Vista General 5 02 Aug 2007
Installing an Application copies entire CD to temp directory bgille Vista performance & maintenance 2 28 Feb 2007