Im trying to create a script that will take a directory off of a webserver and display the filenames of all of the image files that are located in that directory. Can anyone offer any suggestions.
Hi,
If I were trying to accomplish this I would use ASP. What you are trying to do is more of a server action instead of a client side one. If you would like help doing this via ASP let me know.
Well I don't know Cold Fusion so the best I can do is show you a script that I use to search a folder and delete certain files
<% @ language= vbscript%>
<% dim strPathInfo, strPhysicalPath 'The following script checks the report file for PDF files and deletes old ones
strPhysicalPath = "directory/foldername"
Dim objFSO,objFile, objFileItem, objFolder, objFolderContents
set objFSO = CreateObject("Scripting.FileSystemObject"
Set objFile = objFSO.GetFolder(strPhysicalPath)
Set objFolder = objFile.Files
for each objFileItem in objFolder ' finding all PDF files that are more than 1 day old and deleting them
if instr(1,objFileItem.Name,".pdf"> 0 and (dateDiff("D",objFileItem.DateCreated,Date))>1 then
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.