• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 190
  • Last Modified:

Deleting many files with a script

Hello,
we're cleaning up our website and according to Dreamweaver we have about 3000 orphaned files. From this report, and possibly storing the paths to the files in a database, is there a dynamic way to delete these files. Perhaps using Coldfusion or some other tool/language?
I'm open to suggestions.
This is really important. Hope I'm not being too vague.
Thanks,
ECP
0
ecpeel
Asked:
ecpeel
  • 5
  • 3
1 Solution
 
jet-blackCommented:
look to php's unlink function
http://php.net/manual/en/function.unlink.php
0
 
ecpeelAuthor Commented:
Taking a look. Be back with you soon. Thanks Jet-black for the quick response.
0
 
ecpeelAuthor Commented:
Did I mention there's a list of the files in an excel spreadsheet.
Paths/filenames are like:

tempdir/090114 Comments on Proposed Revisions - 2nd draft.pdf
test.cfm
test123.htm
transit/comments08/template.htm

I"m pretty sure I can only do one directory at a time. But having a function that could loop through a list would be the best. PHP.. not my strength but it looks like the unlink function could work. I think there's something similar in CF too.
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
jet-blackCommented:
Sorry, didn't see that this question is under Coldfusion category.
However, the logic would exactly same.
Loop through results and delete the files.

I don't know coldfusion equivalent of php's unlink function.
But you can try to find it by searching
coldfusion file system functions

I think the Coldfusion experts will solve your problem quickly.
0
 
ecpeelAuthor Commented:
Thank you. I thought I had "zoned" Coldfusion but clearly I didn't.
0
 
ecpeelAuthor Commented:
maybe I need to repost and revise my question
0
 
ecpeelAuthor Commented:
that's for providing an alternative.
0
 
jet-blackCommented:
Thanks for the points.
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now