I have an .asp page that currently opens one text file, and creates a new one based on the old text file.
Currently I have a text box where the old file's name/path is entered.
I would like to be able to enter a directory path into the text box, and have the asp open each file in the directory, and create a new file for each one.
Here is my Code:
set fso = server.createobject("Scripting.FileSystemObject"
set readFile = fs
penTextFile(ReadFileName, 1)
set writeFile = fso.CreateTextFile(WriteFileName, True)
While NOT readFile.AtEndOfStream
RLine = readFile.readline
'Manipulate Rline into a bunch of variables
WLine = " " & LineName & ShotPoint & " " & Lat & Lon & " " & xLine & yLine
writeFile.writeline WLine
Wend
Currently the ReadFileName is taken from the querystring(passed from text box), and the WriteFileName is created based on the ReadFileName(The file extension is changed). I would like to get a directory path passed in the querystring, and then make ReadFileName equal to each file name in the directory sequentially. Is this possible in .asp??
Currently I have a text box where the old file's name/path is entered.
I would like to be able to enter a directory path into the text box, and have the asp open each file in the directory, and create a new file for each one.
Here is my Code:
set fso = server.createobject("Scripting.FileSystemObject"
set readFile = fs
set writeFile = fso.CreateTextFile(WriteFileName, True)
While NOT readFile.AtEndOfStream
RLine = readFile.readline
'Manipulate Rline into a bunch of variables
WLine = " " & LineName & ShotPoint & " " & Lat & Lon & " " & xLine & yLine
writeFile.writeline WLine
Wend
Currently the ReadFileName is taken from the querystring(passed from text box), and the WriteFileName is created based on the ReadFileName(The file extension is changed). I would like to get a directory path passed in the querystring, and then make ReadFileName equal to each file name in the directory sequentially. Is this possible in .asp??