Edit and Replace text in a file batch code
This project received 4 bids from talented freelancers with an average bid price of $42 USD.Get free quotes for a project like this
I am looking for an interactive batch file that will look for .cid files located in a directory and find specific text and replace with new text.
Specifically, lets say the directory the .cid files are located in is as follows: C:/WNC/home/d_c/p_p
I want the batch file when loaded to ask the user what the name of the .cid file or files will be but without having to enter .cid after the file (each file seperated by a space or whatever and note to the user how to enter the file when asked), cause I want it to be able to edit multiple files at once if necessary.
The part in the file the batch file needs to look for is REFPOINT=1 (this part should be silent, ie not visible or noted to the user as to what it's looking for, it should just look for this text within the file.
I then want the batch file to ask the user what it would like to change the zone to (ie REFPOINT)
Options being 1 2 3 or 4 (I do not want them to be able to chose anything other than those numbers and only one can be entered)
If the user chooses one of the numbers and the REFPOINT in the file is already set at that number, I want it to echo that to the user that the zone is already at that choce and not change anything and return to the beginning asking if it would like to edit another file or exit. If the user enters multiple files, it should ask if they want the zone to be the same for all files and if not ask the zone it would like for each file separately The home screen (ie the beginning where it asks what file or files you would like to edit, should always have an option to exit)
That is all I want the file to be able to do.
Example of interactive mode:
CID File Zone Transfer Program
Note: File must have a .cid extension
Note: Multiple files should be separated by a space (Example: rstv0123 rstv0124 rstv0125)
Enter the filename(s) to continue or type Exit when finished:
(once the filename or filenames are entered it should clear the screen then present the next options)
(if they type exit, program should close)
Please choose a zone
1 = zone 1
2 = zone 2
3 = zone 3
4 = zone 4
Would you like to zone to be for all files entered? (y/n):
(The file or filenames entered should be echoed with what zone they were transferred to when finished)
At this point is should clear screen and return back to the home screen asking for a file(s) name or to exit.
(Script should be commented at points within the script so I can easily edit it to fit anything I may want to change later if necessary)
It doesn't need to look like the example I put up, that is just an example of how I envision it. If you can make it look cleaner, then that is better.
I think that is all I need it to do for now....if you have any questions, please don't hesitate to ask. Please also keep in contact so if any changes through the process need made we can easily communicate those changes.
Thanks for looking!
Looking to make some money?
- Set your budget and the timeframe
- Outline your proposal
- Get paid for your work
Hire Freelancers who also bid on this project
Looking for work?
Work on projects like this and make money from home!Sign Up Now
- The New York Times
- Wall Street Journal
- Times Online