Hai ,

I am trying to upload a file from a local disk to server. Itz working fine when I upload from d: or c: drives. But it is not uploading When I upload from desktop or Mydocuments. It is giving the following error.

System.IO.FileNotFoundException: Exception from HRESULT: 0x800A0035 (CTL_E_FILENOTFOUND).

But actually the file is there. My coding is :

Dim fs, f
            fs = Server.CreateObject("Scripting.FileSystemObject")
            f = fs.GetFile("C:\Documents and Settings\seetha\My Documents\fresher.doc")
            f.copy(Server.MapPath("Attachments\" & f.name))

Whatz the problem?????

Thanks in Advance

Seetha

the error decription is self explainatory. i.e is file "yourfile.doc" is not available on the specified path.

isfileexist(filename) to see if found or not

Mark as solved if it helps u!!!

Regards

I have checked and the file is there. I opened thro' the run command, itz opening. But thro coding, Not only that file, any file from desktop or mydocuments is not opening. Other locations no problem.

Please help me to solve this

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.