Trying to amend the VBScript in a standard filter
Posted: Fri Dec 19, 2008 8:58 pm
Hello
I was trying to create a new filter based on an existing standard filter. The standard filter is 'rename files according to contents.fll'
I want to change it so that rather than it creating a 'rename' line for each line in the input I just want a file created with only one rename line (i.e if I have an input file with 5 lines I only want 1 output rename line not 5). I've tried taking out the looping part of the below script but my VBS is just not good enough and it doesn't work. Can you advise how I get this filter to create a file with only one rename command line on it? I think the section that needs changing is below but I am not sure how...
'Our filename counter
dim fileNumber
Dim fso, f1
'Called for every line in the file
function processLine(line, EOL)
recid = line
f1.WriteLine( "ren """ & TextPipe.fullInputFilename & """ """ & _
newFilename & recid & newFileExtension & """" )
processLine = line & EOL
end function
thanks
I was trying to create a new filter based on an existing standard filter. The standard filter is 'rename files according to contents.fll'
I want to change it so that rather than it creating a 'rename' line for each line in the input I just want a file created with only one rename line (i.e if I have an input file with 5 lines I only want 1 output rename line not 5). I've tried taking out the looping part of the below script but my VBS is just not good enough and it doesn't work. Can you advise how I get this filter to create a file with only one rename command line on it? I think the section that needs changing is below but I am not sure how...
'Our filename counter
dim fileNumber
Dim fso, f1
'Called for every line in the file
function processLine(line, EOL)
recid = line
f1.WriteLine( "ren """ & TextPipe.fullInputFilename & """ """ & _
newFilename & recid & newFileExtension & """" )
processLine = line & EOL
end function
thanks