Problems Deleting a File

M

Mike

I am trying to delete a excel file after it has been validated for
errors and then put into another folder for processing. My problem is,
when I click on the submit button, the excel file is being put into
the correct folder, but I am getting a permission denied error on my
file2 delete statement below. But if I hit the refresh button, the
file gets deleted the way I want it to. What do I need to do to stop
the permission denied error? Following is the code I am using to
delete the files:

function deleteStoreTempFiles()
{

var file2;
var file3;

file2 = fso.GetFile(storefolder + filename1);
file3 = fso.GetFile(tempfolder + "tmp_" + filename1);
file2.Delete();
file3.Delete();

}

TIA for any help anyone can give me!

Mike
 
A

Andy Fish

it looks like your problem has more to do with jscript or the
FileSystemObject than javascript. probably better to ask in
microsoft.public.activex.programming.scripting.jscript
 

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
474,079
Messages
2,570,574
Members
47,207
Latest member
HelenaCani

Latest Threads

Top