I have many files *.log containing the following lines:
11111/3333/45555/6666/2222//7777
and I need to replace all the "/" by ";" producing the following result:
11111;3333;45555;6666;2222;;7777
But the result must be in a file of the same name but just a differente extension: *.csv. How can I do this using ms-dos batch on windows? PS: I can't use .net, perl, vbscript or some library. This script if for a job interview and they want to test if I know Windows scripting.
I already tried to start but is not working...
@echo off
setlocal ENABLEDELAYEDEXPANSION
for /f "delims='/' tokens=*" %%i in ('findstr "\/" Input.txt') do (
echo %%i
set str=%%i
set myvar=";"
set str=%str:"/"=!myvar!%
echo %str%
)
Many thanks in advance.