Assuming the files are on a local drive, use cfdirectory to get a listing of the files in a particular directory. You can use "filter" to restrict which files are returned.
Example: Find all files starting with: "1000-"
<cfdirectory directory="c:\someFolder\y
action="list"
filter="1000-*"
name="fileList"
type="file">
The result is a query and the file name is stored in the "Name" column
<!--- show all files found --->
<cfoutput query="fileList">
File name = #Name#<br>
</cfoutput>
Main Topics
Browse All Topics





by: cmistrePosted on 2009-07-03 at 16:27:40ID: 24774928
Here is the concept for what I need to do, but I am not sure how to query based on a filename?
Or the best way to loop through and delete the records that are basically outdated. The first 10 characters of the filename will always match the record id of the active records. This is the only way I could think of to do this, but of course it doesnt work since I dont know how to actually reference the name of the file in the directory.
I used **filename** to show where I need to reference this name.
Select allOpen in new window