djpingpong
Programmer
- Jul 6, 2004
- 70
Hello all,
I've been doing a certain task at work manually for a long time and it has reach the point where I would like to create a batch script so that I could run it in DOS (yes, i know it doesn't exist anymore.. but i still like to call it by that name). My work runs a WinXP Pro environment, not sure if that's relevant or not...
But here's my scenario...
I have a master file, "1.doc", and a list of usernames (ie: user.txt may contain 40 names). Basically, here's what I like the batch script to do:
1. loop through user.txt and fetch one username at a time
2. make a copy of 1.doc and paste it to the same folder
3. rename the new copy of 1.doc to "1_username.doc" (of course, the username should be dynamic..)
So if you willing to help, you'd understand how much manual work you will be saving me. Currently, I am making ~30 copies of the same file and then I manually rename the file to its respective username... it might be an easy task, but its tedious and takes me 30min each time, and I do this about 4-5 times per month
I hope there are still ol' skool coders out there who can still script DOS batches... i know this is a dying art
ANY HELP, would be greatly... greatly appreciated
cheers
I've been doing a certain task at work manually for a long time and it has reach the point where I would like to create a batch script so that I could run it in DOS (yes, i know it doesn't exist anymore.. but i still like to call it by that name). My work runs a WinXP Pro environment, not sure if that's relevant or not...
But here's my scenario...
I have a master file, "1.doc", and a list of usernames (ie: user.txt may contain 40 names). Basically, here's what I like the batch script to do:
1. loop through user.txt and fetch one username at a time
2. make a copy of 1.doc and paste it to the same folder
3. rename the new copy of 1.doc to "1_username.doc" (of course, the username should be dynamic..)
So if you willing to help, you'd understand how much manual work you will be saving me. Currently, I am making ~30 copies of the same file and then I manually rename the file to its respective username... it might be an easy task, but its tedious and takes me 30min each time, and I do this about 4-5 times per month
I hope there are still ol' skool coders out there who can still script DOS batches... i know this is a dying art
ANY HELP, would be greatly... greatly appreciated
cheers