Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Copying files to external drive using MS-DOS  (Read 4752 times)

0 Members and 1 Guest are viewing this topic.

Rong1

    Topic Starter


    Newbie

    • Experience: Beginner
    • OS: Unknown
    Copying files to external drive using MS-DOS
    « on: April 18, 2012, 10:10:40 PM »
    I am using XP Pro SP3 operating system.
    In my source 1TB (D:) drive I have a folder titled CD's-all which contains files 00001.mp3 to 30600.mp3 inclusive. I have a list of 20,000 particular mp3 files I wish to copy in a Wordpad (text) document. These files are not consecutive order, otherwise I would simply drag and drop files.
    My destination drive is WD SmartWare (N:), an external 1TB drive.

    My command prompt is  M:\Documents and Settings\Ron>

    Can you give me the correct command line(s) to copy a number of these files
    Could you give me an example, perhaps using files 00001.mp3, 00500.mp3 and 30599.mp3
    Thanks in advance

    Geek-9pm


      Mastermind
    • Geek After Dark
    • Thanked: 1026
      • Gekk9pm bnlog
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: Copying files to external drive using MS-DOS
    « Reply #1 on: April 18, 2012, 11:16:39 PM »
    Welcome!
    Computer Hope is the number one location for free computer help.
    The forum will help everyone with all computer questions.

    After spending several minuets preparing ans answer, I sarted to get a headache.  I believe you do not just want to duplicate everything on one drive onto another.

    Is you intent to copy files by use of a custom list of files by name with no simple  order?
    In mother words, a managed list, not just a list of everything.  That could be very useful. And demanding.

    Yes, that can be done, but I am afraid I wound write something that would fail.  Can you supply a list of perhaps five sample file names  that would be copied? Are folders also to be copied? Will any of the null path names be over 125 characters?

    The test file must be actual text only. No word-
    processing codes. That is, not a RTF, but a TXT type.

    I have to retire now, but somebody else will come in here to help.

    BC_Programmer


      Mastermind
    • Typing is no substitute for thinking.
    • Thanked: 1140
      • Yes
      • Yes
      • BC-Programming.com
    • Certifications: List
    • Computer: Specs
    • Experience: Beginner
    • OS: Windows 11
    Re: Copying files to external drive using MS-DOS
    « Reply #2 on: April 18, 2012, 11:45:00 PM »
    Code: [Select]
    for /f "delims=" %%p in (listing.txt) do echo D|xcopy "D:\CDs\%%p" "N:\CDs\%%p" /i /z /y

    listing.txt is the text file that lists one filename per line.
    I was trying to dereference Null Pointers before it was cool.