ну вот у меня есть код, который при заданном параметре, пропускает строки с решеткой
set args = wscript.arguments
set fso = wscript.createobject("scripting.filesystemobject")
set shell = wscript.createobject("wscript.shell")
dir = "h:\smth" ' нужно указывать существующую папку
if args.count > 0 then
if fso.folderExists(args(0)) then
dir = args(0)
end if
end if
if args.count > 1 then
sec = 1
else
sec = 0
end if
shell.currentDirectory = dir
if fso.fileExists("out.txt") then
fso.deleteFile("out.txt")
end if
set stream = fso.opentextfile("out", 2, true)
for each file in fso.getFolder(shell.currentDirectory).files
if len(file.name) > 3 then
if ucase(right(file.name, 3)) = "TXT" then ' будем читать только файлы с расширением.txt
set stream1 = fso.openTextFile(file.name, 1)
do
str = stream1.readline
if (sec = 1) and (len(str) > 0) then
if left(str, 1) <> "#" then
stream.writeline str
end if
else
stream.writeline str
end if
loop until stream1.atEndOfStream
stream1.close
end if
end if
next
stream.close
set file = fso.getFile("out")
file.name = "out.txt"
и в нем мне нужно еще сделать, чтоб он пропускал строки с ! и |