John K.
03-25-2000, 12:52 PM
Hi!
I'm using the following code to print all filenames in a certain folder
to the webpage.
_______________________________________________
Set fs = server.CreateObject("Scripting.FileSystemObject")
Set folder = fs.GetFolder("d:\pictures")
Set fc = folder.Files
ReDim sFiler(fc.count)
For Each f in fc
sFil = fs.getfile(f)
response.write sfil.path
response.write sfil.name & "<br>"
Next
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
But some how it removes the last characters of every filename.
For example, if the first file in the folder is named "image.jpg",
the error message is: "Object required: 'D:\pictures\ima'"
Why does it cut off the last characters?
Anyone knows?
Pls help
Thanx in advance!
/John
I'm using the following code to print all filenames in a certain folder
to the webpage.
_______________________________________________
Set fs = server.CreateObject("Scripting.FileSystemObject")
Set folder = fs.GetFolder("d:\pictures")
Set fc = folder.Files
ReDim sFiler(fc.count)
For Each f in fc
sFil = fs.getfile(f)
response.write sfil.path
response.write sfil.name & "<br>"
Next
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
But some how it removes the last characters of every filename.
For example, if the first file in the folder is named "image.jpg",
the error message is: "Object required: 'D:\pictures\ima'"
Why does it cut off the last characters?
Anyone knows?
Pls help
Thanx in advance!
/John