# Batch file to change file extensions



## Joe4 (Jan 6, 2006)

Barry was kind enough to help me write some Excel VBA script that will rename a text file with a ".prn" extension to a ".txt" extension ( http://www.mrexcel.com/board2/viewtopic.php?t=187679&highlight= ).  This works great for new files being created, but I have to clean up a bunch of old files.  

Can anyone help me write a Batch file (.bat) that I can run that will convert ALL existing "*.prn" extensions to "*.txt"?  

The tricky part is that I need to do this without using the two step COPY then DELETE technique, as new "*.prn" files are being added all the time and I can't risk deleting one without changing it to a ".txt" (if one is being added while the batch file is running).

Thanks.


----------



## Joe4 (Jan 6, 2006)

Barrie came through again!

From Barrie:


> This worked for me.
> 
> 
> ```
> ...


----------

