No announcement yet.

Batch file copy command

  • Filter
  • Time
  • Show
Clear All
new posts

  • Batch file copy command

    My goal: Use a batch file to Copy many folders and files from C:
    to D a CD-RW) for the end user. I know this is not a true PB
    problem, but the program files are PB DOS Exe files in addition
    to other data files..

    All folders contain files. All files in SubFolders of Fold2
    need to be copied to the CD-RW. Here is the C: folder structure:
    C:\CASE (known)
    C:\CASE\Fold1 (known)
    C:\CASE\Fold1\Fold2 (known)
    C:\CASE\Fold1\Fold2\xyzujkwe (unknown 8 char name)
    C:\CASE\Fold1\Fold2\yete7623 (unknown 8 char name)

    C: SubFolder Fold2 contains many files, I’ve already copied
    the appropriate files to D:\CASE\Fold1\Fold2.
    Other Files are not to be copied.

    C: SubFolders of Fold2 exist. The number and name of the
    C: SubFolders of Fold2 are unknown.
    There is a least 1 C: SubFolder of Fold2.

    Attempt #1-Almost works
    Xcopy C:\CASE\Fold1\Fold2 /s/e/v D:\CASE\Fold1\Fold2

    I get the C: SubFolders of Fold2 on the CD, however, there are
    no files in the D: SubFolders of Fold2 on the CD

    Attempt#2-Works, but seems clumsy to me.
    Use Attempt#1 to establish the SubFolders on the CD.
    A PB DOS program finds the C: SubFolders of Fold2 and
    Copies the files to D:\CASE\Fold1\Fold2\xyzujkwe and

    Advice is welcome and appreciated.
    I’ve gotten good advice in the past, so here I am again.



  • #2
    Xcopy C:\CASE\Fold1\Fold2\*.* D:\CASE\Fold1\Fold2 /s/e/v


    [This message has been edited by Peter Lameijn (edited September 13, 2003).]

    "Simplicity is a prerequisite for reliability"


    • #3
      Thanks for the info, but that does not work.



      • #4
        Assuming you want to copy the entire c:\case sub-directory,
        I would use the syntax:

        xcopy C:\CASE\*.* D:\CASE\*.* /v/s

        That's always worked for me.

        If you are doing this in windows, have you tried left click,
        drag, drop-n-copy?

        [This message has been edited by Mel Bishop (edited September 13, 2003).]
        There are no atheists in a fox hole or the morning of a math test.
        If my flag offends you, I'll help you pack.


        • #5
          The various subfolders have many files, not all that that I
          want to copy to the CD. All of these subfolders and files have
          known names and the batch file commands copies those just fine.

          The unknown named and unknown how many subfolders have at least
          1 file in them. There is at least 1 unknown named subfolder
          (8 character random name.)

          I thought something like the previous response was the answer to
          the problem. No the variations that I tried worked.

          Thanks for considering my problem, Jack



          • #6
            you might get more 'focused' and better advice on Usenet from one of these ngs:


            Michael Mattias
            Tal Systems (retired)
            Port Washington WI USA
            [email protected]