Solved: Adding .1 to file names thru Batch Script

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

screamoon

Thread Starter
Joined
Jul 19, 2006
Messages
9
SUppose I have a text file with contents as :
1)000000fd9ac1873d-0000-0509-94050a25
2)000000fd57acc331-0000-0ed6-94050a25
3)00000102ac2a457b-0000-045d-94050a25
4)00000104a5b5af66-0000-0431-94050a25


I want to add .1 at the end of every file name. How do I do this ?

Please Help

Thanking you
scream
 
Joined
Aug 27, 2004
Messages
318
Well if you have Windows 2000 / XP / 2003 / Vista, you could write this script and it would work:
Code:
@Echo Off
setlocal enableextensions
FOR /F "usebackq delims=" %%i IN (FullPathToYourFile) DO ren %%i %%i.1
endlocal
The FOR command in Windows XP (with command extensions enabled) has many powerful uses, just run FOR /? in a command prompt to read about them all with examples.

Hope that helps you...
 

screamoon

Thread Starter
Joined
Jul 19, 2006
Messages
9
@echo
for /f %%L in (c:\Files.txt) do (
>> newfile.txt echo %%L.1 )

I used this and it is working perfect.......


Thank you for the reply
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Members online

Top