Copy file with specific extension if it is equal to today

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
suprsnipes
Posts: 1
Joined: 22 Dec 2011 20:29

Copy file with specific extension if it is equal to today

#1 Post by suprsnipes » 22 Dec 2011 20:39

Hi, this is my first post on this forum.

I would like to create a batch file to perform the following.

If a file within a specific directory is equal to today's date & ends with a specific extension then I want to copy the file.

The host directory is;
C:/tcp

The file extension is .raw

The target directory is
C:/poti

Is it possible to copy the file to the same file name?

I only want to perform the copy if the above two conditions are met. I am using ddmmyy.

Kind regards,
suprsnipes

orange_batch
Expert
Posts: 442
Joined: 01 Aug 2010 17:13
Location: Canadian Pacific
Contact:

Re: Copy file with specific extension if it is equal to toda

#2 Post by orange_batch » 22 Dec 2011 23:45

I would help more, but please do some manual research. http://ss64.com/nt/xcopy.html

Type this into the console.

xcopy /?

What you're looking for is the /d switch, among others.

Post Reply