Wrox Programmer Forums
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old July 15th, 2003, 09:33 AM
Authorized User
Join Date: Jun 2003
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default Multiple delete of files with FSO error

Hello all

I try to do a multiple delete of files through FileSystemObject, but after deleting the first file, ASP gives me a "Permission denied" error. Below you see my code:

Set fso = CreateObject("Scripting.FileSystemObject")
For Each Item in Request.Form("filename")
    delFile = path2 & "\files\" & Item
    fso.DeleteFile delFile

Anybody can find my mistake?
Old July 15th, 2003, 06:24 PM
Friend of Wrox
Join Date: Jun 2003
Posts: 215
Thanks: 0
Thanked 0 Times in 0 Posts

The error is that the account under which IIS is running does not have permission to delete the file. This may be due to one of two reasons, insufficient permissions or the file has been locked by another process.

David Cameron

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to delete file System.IO.Delete error maricar C# 13 March 14th, 2014 06:50 AM
fso error merck_04 .NET Framework 1.x 0 October 18th, 2006 05:53 AM
Strange error when running macro in multiple files medaugh Excel VBA 0 September 15th, 2003 11:06 AM
Multiple delete of files with FSO error nikosdra Classic ASP Basics 1 July 15th, 2003 10:04 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.