Примерно так (не проверялось):
Скрытый текст
Код:
Option Explicit
Const ForWriting = 2
Dim strSourceFile
Dim strContent
If WScript.Arguments.Count = 1 Then
strSourceFile = WScript.Arguments.Item(0)
With WScript.CreateObject("Scripting.FileSystemObject")
If .FileExists(strSourceFile) Then
With .OpenTextFile(strSourceFile)
strContent = .ReadAll()
.Close
End With
With .OpenTextFile(strSourceFile, ForWriting)
.Write Replace(strContent, "@", "#")
.Close
End With
Else
WScript.Echo "Can't find source file [" & strSourceFile & "]."
WScript.Quit 2
End If
End With
Else
WScript.Echo "Usage: cscript.exe //nologo """ & WScript.ScriptName & """ <Source file>"
WScript.Quit 1
End If
WScript.Quit 0
Путь к целевому файлу указывается аргументом скрипта (также можно просто перетащить целевой файл на скрипт в Проводнике).