Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - ASP code to list/delete files in a folder
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ASP code to list/delete files in a folder

 Post Reply Post Reply
Author
Jhinuk View Drop Down
Newbie
Newbie
Avatar

Joined: 19 August 2002
Location: United States
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jhinuk Quote  Post ReplyReply Direct Link To This Post Topic: ASP code to list/delete files in a folder
    Posted: 15 November 2006 at 2:11am
Hi,

I am looking for a code snippet (in classic ASP) that will not only list all the files in s specified folder (I have instances of that), But also create a DELETE button along side the file names (or check boxes beside each file name, with one delete button) so that the files can be removed from the folder,

The file listing part is easy; that can be done with the following code snippet, I think:

Set objFso = CreateObject("Scripting.FileSystemObject")
  Set objFiles = objFso.GetFolder(Server.MapPath("."))
  Set fileList = objFiles.Files
  For Each i in fileList
  response.write i.name & "<br>"
  next


But, my ASP 
strengths are not up to where I can write what I need.  I have all over the web, but cannot seem to locate such a code snippet.  I would be very appreciative if you can help.

Thanks.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.