# Batch File Problem... renaming files



## Resin (Sep 28, 2006)

I think I found an easier way to make the files I move unique (this was what I wanted to accomplish in my question before I edited it). I'm just going to throw the date on the end of the filename. 

How would I do this?

SET pics=C:\test\pics\
set append=%date:~4,2%%date:~7,2%%date:~10,4%

rename %pics%*.* *%append%.*

This returns an error about missing file or duplicate file I think. Where did I go wrong?


----------



## JohnWill (Oct 19, 2002)

There are easier ways. 

http://www.1-4a.com/rename/

http://www.bulkrenameutility.co.uk/Main_Intro.php


----------



## Resin (Sep 28, 2006)

I can already do bulk renames with ACDsee. I just want to do it as part of moving the files into the appropriate directories. I solved my problem with the date, so I'm just adding that to the end of the file names to make them unique.


----------



## ChuckE (Aug 30, 2004)

IrfanView, need I say more?

I just did what you seem to want.
I renamed the current file names by just adding the system date onto the end of a file. (Other options can also use the file date, for example.)
It also moved the files into another location. (I could have just copied the files, if I wanted.)
It worked with multiple files types (i.e. JPG, GIF, and TIF) with the same single Batch action. 
I left the output untouched, so it did not (but I could have) convert the multiple types into one picture format.

OH! and by the way, IrfanView can be used from the Command Line, you do not have to open the IrfanView UI to used the myriad of options and features.


----------

