Thank you Dragokas -
A little bit of revising but it worked out nice.
Search found 9 matches
- 31 Jul 2013 09:26
- Forum: DOS Batch Forum
- Topic: Looping replace
- Replies: 2
- Views: 3639
- 30 Jul 2013 13:49
- Forum: DOS Batch Forum
- Topic: Looping replace
- Replies: 2
- Views: 3639
Looping replace
Is it possible to loop this script in a for each command to perform on each file in a given folder? @echo off set "replace=system" set "replaced=offline" set "source=control.reg" set "target=control2.reg" setlocal enableDelayedExpansion ( for /F "tokens=1...
- 29 Jul 2013 12:25
- Forum: DOS Batch Forum
- Topic: Batch file edit text file
- Replies: 20
- Views: 50944
Re: Batch file edit text file
That worked greatly. Thank you for the assistance.
- 29 Jul 2013 11:47
- Forum: DOS Batch Forum
- Topic: Batch file edit text file
- Replies: 20
- Views: 50944
Re: Batch file edit text file
Here is my demima: from your PC, go to regedit and export the following hive as "control.reg" - [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\CriticalDeviceDatabase] Then with the following code tell me if you can change the the word "SYSTEM" to "offline" (on each li...
- 28 Jul 2013 16:02
- Forum: DOS Batch Forum
- Topic: Batch file edit text file
- Replies: 20
- Views: 50944
Re: Batch file edit text file
My output file still seems to be blank. I change the values for the 4 "set" lines to match my environment - am I missings something?
- 28 Jul 2013 14:27
- Forum: DOS Batch Forum
- Topic: Batch file edit text file
- Replies: 20
- Views: 50944
Re: Batch file edit text file
penpen,
I tried this - it seems to just create a blank file with the given "target" name. No changes in the origial file as reqested even given the settings for replaced and replace that don't seem to change.
I tried this - it seems to just create a blank file with the given "target" name. No changes in the origial file as reqested even given the settings for replaced and replace that don't seem to change.
- 28 Jul 2013 11:52
- Forum: DOS Batch Forum
- Topic: Batch file edit text file
- Replies: 20
- Views: 50944
Batch file edit text file
Is it possible for a batch file to: search a given text file for a given word/string and change that word/string then save it with the changes? I have search online but not finding this specific script that will help. The file I am looking to work with is a .reg file if that helps. Thank you.
- 27 Jul 2013 15:12
- Forum: DOS Batch Forum
- Topic: For do if exist loop
- Replies: 2
- Views: 3853
Re: For do if exist loop
Thank you greatly aGerman. That works!
- 27 Jul 2013 10:46
- Forum: DOS Batch Forum
- Topic: For do if exist loop
- Replies: 2
- Views: 3853
For do if exist loop
Could someone please assist with the correct syntax for this? It errors out after seeing the second file in the string if it doesn't exist. Thank you, for /f "tokens=*" %%X in (hal.dll halacpi.dll halmacpi.dll kernel32.dll ntdll.dll ntoskrnl.exe win32k.sys winload.exe winsrv.dll) do (if ex...