G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.customize (More info?)

I have been having a problem with a simple batch file. I want to copy from
my card reader (F:) to the hard disk (C:\pictures).
The problem is that, as I take more pictures during the day, the folder
on the F: drive (compact flash memory card in the card reader) keeps
changing, i.e., from F:\canon220\ to F:\canon\221\ etc.

A batch file like this work initially: copy f:\canon220\*.*
c:\pictures

Naturally that batch file won't work when the source directory is \canon221.
So I tried copy f:\canon???\*.* or copy f:\canon*\*.* or copy f:\*\*.*
but none of them worked.

I would appreciate any ideas for a batch file that I would not have to
change each time the camera creates a new folder for pictures on the memory
card.

Thanks, CMA
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.customize (More info?)

If there's only one such directory, you can

cd /d f:\canon*
copy *.* c:\pictures

If there are several such directories there's no guarantee which one
will be processed by the above example, and there is, of course, the
question of which one you want to process (the newest?). If you wanted
to process them all (including the case where there's only one), you
could:

for /d %%d in (f:\canon*) do copy %%d\*.* c:\pictures

- Vince

On Mon, 8 Nov 2004 10:31:47 -0500, "CMAR" <vrv7j@yahoo.com> wrote:

>I have been having a problem with a simple batch file. I want to copy from
>my card reader (F:) to the hard disk (C:\pictures).
> The problem is that, as I take more pictures during the day, the folder
>on the F: drive (compact flash memory card in the card reader) keeps
>changing, i.e., from F:\canon220\ to F:\canon\221\ etc.
>
>A batch file like this work initially: copy f:\canon220\*.*
>c:\pictures
>
>Naturally that batch file won't work when the source directory is \canon221.
>So I tried copy f:\canon???\*.* or copy f:\canon*\*.* or copy f:\*\*.*
>but none of them worked.
>
>I would appreciate any ideas for a batch file that I would not have to
>change each time the camera creates a new folder for pictures on the memory
>card.
>
> Thanks, CMA
>
>