Scripting.FileSystemObject

  • Thread starter Giorgio Cervati
  • Start date
G

Giorgio Cervati

Hi everybody,
found strange behavior in Scripting.FileSystemObject;
only FileExists() method seems to work fine. All other methods cause browser
to indefinitely wait for something that never come.

Here is a sample code. Proc call "fso.CopyFile oldfile,newfile" seems to
cause client to wait until.....what? If I rem that call everything goes fine
and fileexists method found the file....
Any suggestion?

Thanks in advance.

G.

<%
Dim fso
oldfile=Server.MapPath("/asp/test/old.asp")
newfile=Server.MapPath("/asp/test/new/old.asp")

Set fso=CreateObject("Scripting.FileSystemObject")
if (fso.FileExists(old)) then
%>
Found...
<%
fso.CopyFile oldfile,newfile
else
%>
NOT FOUND...
<%
end if
%>
 

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

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,233
Members
46,820
Latest member
GilbertoA5

Latest Threads

Top