Copy Files by Renaming after Checking if it Exists and is...

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Locked
Message
Author
Anonimoouse
Posts: 10
Joined: 19 Jun 2012 13:45

Copy Files by Renaming after Checking if it Exists and is...

#1 Post by Anonimoouse » 21 Jun 2012 13:46

Batch Scripting:
I have few files in source location to be copied to destination location by renaming them. But before that I have to check if the file exists or is empty(no data in file) in the source location. If it does not exist or is empty in the source then do nothing.
Else copy from source to the destination by renaming it.
Example would be like
Source has files:
File(1).dat
File(2).dat
File(3).dat
Destination should have:
Rev(1).dat
Rev(2).dat
Rev(3).dat
assuming all files are non-empty. Thank you!!

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: Copy Files by Renaming after Checking if it Exists and i

#2 Post by Ed Dyreen » 21 Jun 2012 14:32

'
Hi Anonimoouse,

This topic is now locked, I see no reason for having two different topics with a similar question.

[Copy Files by Renaming after Checking if it Exists and is...]
viewtopic.php?p=17236#p17236
[Copy File:If Empty Or Not Exists - NOTIFY- If Exists - COPY]
viewtopic.php?p=17159#p17159

Feel free to PM a moderator about it if you feel this is unjust.


Kind regards,

Locked