Search found 4 matches
- 24 May 2012 12:31
- Forum: DOS Batch Forum
- Topic: Finding and replacing in file with special char?
- Replies: 9
- Views: 6424
Re: Finding and replacing in file with special char?
Sorry about that here's what I did: @echo off SETLOCAL ENABLEEXTENSIONS SETLOCAL DISABLEDELAYEDEXPANSION set file=oldfile.txt set "?=!?:/=!" set "?=!?:-=!" set "?=!?:\=!" set "?=!?: =!" set "?=!?:,=!" set "?=!?:.=!" set "?=!?::=!"...
- 24 May 2012 11:35
- Forum: DOS Batch Forum
- Topic: Finding and replacing in file with special char?
- Replies: 9
- Views: 6424
Re: Finding and replacing in file with special char?
Hi thanks for your replies.
@aGerman Sadly I cannot use the code you suggested since my lines exceed 1021 characters. Thanks anyway.
@Ed I tried putting that code near the top of my program and it had no effect. Am I using it incorrectly? Thanks
@aGerman Sadly I cannot use the code you suggested since my lines exceed 1021 characters. Thanks anyway.
@Ed I tried putting that code near the top of my program and it had no effect. Am I using it incorrectly? Thanks
- 24 May 2012 09:52
- Forum: DOS Batch Forum
- Topic: Finding and replacing in file with special char?
- Replies: 9
- Views: 6424
Re: Finding and replacing in file with special char?
Unfortunately that's not an option; is there any way to do it with just the batch file? It works fine for other files but the moment I hit "< or &# it doesn't know what to do. Was there ever a workaround for this?
Thanks
Thanks
- 23 May 2012 10:43
- Forum: DOS Batch Forum
- Topic: Finding and replacing in file with special char?
- Replies: 9
- Views: 6424
Finding and replacing in file with special char?
I need to make a .bat file that finds and replaces a few words. I can do this just fine, but the file I am reading contains: "< ............. &# (ignore the periods, just they just separate the two sets of characters) when it reads these two special characters, it cannot process them and si...