Automatically copy a big list of files in Win XP

V

Vital Miranda

I’m trying to copy 250 files (music files) from a DVD (containing almost 2000
files) to a folder in my computer (C:\KVM).

Since the name of the files I want to copy to my computer are listed in an
excel spreadsheet, I created a batch file (bat), which uses the copy command
for each of the 250 songs in the following format:

COPY D:\Name of File 1 C:\KVM
COPY D:\Name of File 2 C:\KVM
COPY D:\Name of File 3 C:\KVM
and so on

However, after executing/running the batch file in DOS mode from within
Windows XP I get the following error message for each of the lines:

“The system cannot find the file specifiedâ€

Bellow is just a little sample of my BAT file.

COPY D:\Akon - Smack That - Konvicted.mp3 C:\KVM\
COPY D:\Barthezz - On The Move - On The Move.mp3 C:\KVM\
COPY D:\Benny Benassi_The Biz - Satisfaction - Hypnotica.mp3 C:\KVM\
COPY D:\Amber - Yes - Naked.mp3 C:\KVM\
COPY D:\Cirrus - Boomerang [The Light Mix] - Trance Universe.mp3 C:\KVM\

Is there something that I’m doing wrong? Why the system cannot find the file
when the address and name of the file indicated is correct?

Is there any automatic way in Win XP to do this type of operation (using the
list from Excel) without having to manually find the file in the DVD and drag
it to the folder in the computer?
 
J

JS

You have spaces in the file names you are trying to copy.
To fix the problem enclose the file name in quotation marks as show below.

copy d:\"Akon - Smack That - Konvicted.mp3" C:\KVM

JS
www.pagestart.com
 
V

VanguardLH

Vital said:
Iÿm trying to copy 250 files (music files) from a DVD (containing almost 2000
files) to a folder in my computer (C:\KVM).

Since the name of the files I want to copy to my computer are listed in an
excel spreadsheet, I created a batch file (bat), which uses the copy command
for each of the 250 songs in the following format:

COPY D:\Name of File 1 C:\KVM
COPY D:\Name of File 2 C:\KVM
COPY D:\Name of File 3 C:\KVM
and so on

However, after executing/running the batch file in DOS mode from within
Windows XP I get the following error message for each of the lines:

´The system cannot find the file specified¡

Bellow is just a little sample of my BAT file.

COPY D:\Akon - Smack That - Konvicted.mp3 C:\KVM\
COPY D:\Barthezz - On The Move - On The Move.mp3 C:\KVM\
COPY D:\Benny Benassi_The Biz - Satisfaction - Hypnotica.mp3 C:\KVM\
COPY D:\Amber - Yes - Naked.mp3 C:\KVM\


Is there something that Iÿm doing wrong? Why the system cannot find the file
when the address and name of the file indicated is correct?

Is there any automatic way in Win XP to do this type of operation (using the
list from Excel) without having to manually find the file in the DVD and drag
it to the folder in the computer?

What did you expect the command-line parser to do with all those spaces
in the filenames? Just how was the parser to know when a parameter
stopped and the next began? Even you know that parameters are delimited
by spaces. So if an argument contains a space, you need to delimit it
within double-quotes.

Take your last line shown above:

COPY D:\Cirrus - Boomerang [The Light Mix] - Trance Universe.mp3 C:\KVM\

You have 1 command with *TEN* arguments, which are:
D:\Cirrus
-
Boomerang
[The
Light
Mix]
-
Trance
Universe.mp3
C:\KVM\

However, if you had enclosed the strings containing spaces within
double-quotes and instead specified:

COPY "D:\Cirrus - Boomerang [The Light Mix] - Trance Universe.mp3"
C:\KVM\

then you would've had 1 command followed by TWO arguments (source and
destination). Because paths and filenames are allowed to contain
spaces, and because command lines are usually parsed by space characters
as delimiters, you should always enclose paths and files within
double-quotes. It doesn't hurt to quote a string even if it doesn't
have spaces.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top