2011-07-14 10 views

答えて

2

このBatchSubstitute関数を使用できます。あなたの特別なケースのための

またはビット簡素これは;

setlocal DisableDelayedExpansion 
for /f "delims=" %%A in ('"findstr /n ^^ myFile.txt"') do (
    set "line=%%A" 
    setlocal EnableDelayedExpansion 

    set "line=!line:*:=!" 
    if defined line (
     set "line=!line: =;!" 
     (echo(!line!) 
    ) ELSE echo(
    endlocal 
)
0

UnxUtilsいくつかのGNUユーティリティのネイティブのWin32ポート http://unxutils.sourceforge.net/

からsedをインストールしてから、この

を試すと TABを置き換えます
sed "s/\t/;/g" input.txt >output.txt 
1

ある値を別の値に置き換えるAutohotkeys版。

 

#Env 
SendMode Input 

SetWorkingDir %A_ScriptDir% 
FileSelectFile, filname,3,%A_ScriptDir%\*.csv, comma-separated values (*.csv) 
FileRead, content, %filname% 

Outputvar := regexreplace(content,";",",") ;Thisone replaces ; with , 
;Outputvar := regexreplace(content,"\x20{3,}",",") ;Thisone replaces 3 spaces or more with , 
FileDelete %filname% 
FileAppend, %Outputvar%, %filname% 

関連する問題