Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

copy files and folder and rename/increment name if file or folder already exists

174 views
Skip to first unread message

RCGUA

unread,
Jun 8, 2009, 5:57:52 PM6/8/09
to
I wrote a nice little dos batch file to copy .jpg files from a CD to
the hard drive and recreate the directory tree. The user clicks on
the batch file and it automatcially runs.

Many of the files on various CDs will have the same name, for example,
the first CD being copied may have the following filename and
folders d:\DCIM\image01.jpg

and then the next CD may also have a folder and file named d:\DCIM
\image01.jpg

I am trying to enable the user to just run the batch file on every CD
and copy all the files to a USB external drive.

Should I post the current code? This is running on a Vista laptop.

foxidrive

unread,
Jun 8, 2009, 6:40:09 PM6/8/09
to
On Mon, 8 Jun 2009 14:57:52 -0700 (PDT), RCGUA <stv.n...@gmail.com>
wrote:

>I wrote a nice little dos batch file to copy .jpg files from a CD to
>the hard drive and recreate the directory tree. The user clicks on
>the batch file and it automatcially runs.
>
>Many of the files on various CDs will have the same name, for example,
>the first CD being copied may have the following filename and
>folders d:\DCIM\image01.jpg
>
>and then the next CD may also have a folder and file named d:\DCIM
>\image01.jpg
>
>I am trying to enable the user to just run the batch file on every CD
>and copy all the files to a USB external drive.

Add a line or two to generate the current date and time in a variable, and
create a root folder with that name, for each time it is run:
20090609-08.38.40 for example.

See Timo's FAQ for information on creating the date-time variable.

RCGUA

unread,
Jun 8, 2009, 7:53:50 PM6/8/09
to
On Jun 8, 5:40 pm, foxidrive <got...@woohoo.invalid> wrote:
> On Mon, 8 Jun 2009 14:57:52 -0700 (PDT), RCGUA <stv.nels...@gmail.com>

Excellent, I will do that and post the finished code.

0 new messages