I have a text file (output of the dsquery command of several fields) that has a delimiter of four spaces. I need to change the delimiter to something else (since data in some of the lines contain a single space) so I can import the file into a table. I have a batch file (see code) that is close, but no cigar. I cannot get the delims to see *multiple* spaces as a delimiter. The behavior is to handle *any* number of spaces as one (1).
I have to deal ONLY in BATCH.
No windows scripting,
No third party utilities.
Ideas how to do this?
for /f "skip=2 tokens=1-5 delims= " %%i in (filename.txt) do @echo %%i~%%j~%%k~%%l