Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Edit file in batch program
Name: Chonn Date: September 24, 2003 at 13:23:01 Pacific OS: XP CPU/Ram: 2.8Ghz/256MB
Comment:
Hey all thanks for taking a look at this... I am creating a batch file that copies 4 files (1 Executable) and 1 folder to individual drives. One of the files needs to be edited in order for the program to work. The 1 file that is edited needs to corespond to the drive letter that it has been copied to. I would like to do this in the batch file. I already have the copy structure written but I don't know how to edit the file in the batch program and then save it. Any comments and help are appreciated...
Name: Nathan Date: September 24, 2003 at 15:45:40 Pacific
Reply:
i didn't read into it but i think this is what you need.
@echo off echo (file content here)>(filenamehere.ext)
i tried. hit me back if i'm wrong.
0
Response Number 2
Name: chonn Date: September 26, 2003 at 10:58:19 Pacific
Reply:
Thanks for the response. What you posted would erase the contents of the file I am trying to edit. I am trying to edit one line of it.
0
Response Number 3
Name: DaveHo Date: October 30, 2003 at 04:06:43 Pacific
Reply:
Go to http://files.danen.org/h/ut/batch.shtml and get cutpak11.zip. In here is a utility called xchange.exe, which should do what you want as long as you know the existing string and the replacement string. All the above is freeware HTH
Summary: I would like to capture keyboard input from a user and save it to particular line in an existing text file. ie. Batch may ask: What is your name? User via keyboard inputs: JohnDoe (return/enter) that ...
Summary: Hi all, I want to automatically open a telnet session through a batch script. The user name and password should also be automatically supplied by the batch script. After opening the telnet session it ...
Summary: Hi, I'm running a batch file to delete some old log files in the "Microsoft SQL Server" folder. It works fine when I test it in a short path like "C:\testfolder", but if I use the path with a space in...