I'm trying to go through a .csv file I've copied in a .txt, and find any line that has any of these characters \ / : * ? " ' < >.
In this code I use find to output all line containing "/", but how can I look for every line with one of the special characters above?
@echo off
setlocal
for /f "delims=" %%I in ('powershell -noprofile "iex (${%~f0} | out-string)"') do (
mkdir Output
copy "%%~I" Output\csvCopy.csv
)
for /f "tokens=2,* delims=;" %%a in (Output\csvCopy.csv) do ( echo %%b >> Output\debug.txt )
find /N "/" Output\debug.txt > Output\finalDebug.txt
start "" Output\finalDebug.txt
pause
@REM delete folder output
goto :EOF
: end Batch portion / begin PowerShell hybrid chimera #>
Add-Type -AssemblyName System.Windows.Forms
$f = new-object Windows.Forms.OpenFileDialog
$f.InitialDirectory = pwd
$f.Filter = "CSV Files (*.csv)|*.csv|All Files (*.*)|*.*"
$f.ShowHelp = $true
$f.Multiselect = $false
[void]$f.ShowDialog()
if ($f.Multiselect) { $f.FileNames } else { $f.FileName }