Deleting a file with the FileSystemObject

R

Roger Withnell

Going round in circles trying to do this. If I use:
Set objFS = Server.CreateObject
("Scripting.FileSystemObject")
objFS.DeleteFile (vPath & "AndreaBremner.gif")
the page hangs on the objFS.DeleteFile
and if I use:
Set objFS = Server.CreateObject
("Scripting.FileSystemObject")
Set objFile = objFS.GetFile (server.mappath
("Temp\AndreaBremner.gif"))
objFile.Delete
it hangs on the Set objFS.

What am I doing wrong?

Thanking you in anticipation.
 
R

Roger Withnell

Right on Aaron. Wish I'd tried it on the operational server before
panicking and posting my problem

Let me ask another dumb question.

In session 1, an image is pulled out of a database and saved to server
hard disk and when the page has finished with it it deletes the copy on
the hard disk.

Meanwhile, session 2 is using the same image ie the same path and
filename and hasn't finished with the image when session 1 deletes it.

Does IIS, ASP or somebody else take care of this eventuality or do I
have a problem?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,533
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top