Search found 4 matches

by CharlesMM
07 Apr 2020 02:06
Forum: DOS Batch Forum
Topic: Windows Batch - Print line file containing exclamation mark
Replies: 6
Views: 8840

Re: Windows Batch - Print line file containing exclamation mark

Thanks, this works, but the same problem occurs when the "%" character is present in the file (these are files that contain SQL scripts) :cry: .

Isn't there a way to escape the entire row?

Thanks again.
by CharlesMM
06 Apr 2020 13:15
Forum: DOS Batch Forum
Topic: Windows Batch - Print line file containing exclamation mark
Replies: 6
Views: 8840

Re: Windows Batch - Print line file containing exclamation mark

I have used both methods but the result has not changed

I'm not very good with batch, can you please post the whole code?

Thanks in advance
by CharlesMM
06 Apr 2020 10:21
Forum: DOS Batch Forum
Topic: Windows Batch - Print line file containing exclamation mark
Replies: 6
Views: 8840

Re: Windows Batch - Print line file containing exclamation mark

Thanks for the reply, but I was unable to resolve. I'm probably wrong, but I've tried both: @echo OFF setlocal ENABLEDELAYEDEXPANSION for /F "usebackq delims== tokens=*" %%A in ("file_prova.txt") do ( echo %%A" ) endlocal exit /b %ERRORLEVEL% that: @echo OFF setlocal ENABLEDELAYEDEXPANSION for /F "u...
by CharlesMM
06 Apr 2020 06:14
Forum: DOS Batch Forum
Topic: Windows Batch - Print line file containing exclamation mark
Replies: 6
Views: 8840

Windows Batch - Print line file containing exclamation mark

Hello everybody, I developed a batch that cycles through the contents of the file and prints the value of the lines in another file, but I'm having problems with lines containing the "!" character. Below is a simplified example of what I am doing and the result obtained: Contents of the one-line exa...