Jump to content

FSO in ASP.NET 2.0


kwilliams

Recommended Posts

I used FSO in ASP without any problems, and I'm wondering if you can use FSO in the same way in ASP.NET (2.0). This is the method that I've been using in ASP:

Dim strPhotoPath = Trim(rsPhoto("DC_FileName").Value.ToString)Dim objFSO As Object = Server.CreateObject("Scripting.FileSystemObject")Dim strPhotoFilePath As String = "\\SERVER1\Photo\" & strPhotoPathDim strPhotoDestination As String = "e:\wwwroot\SERVER2\temp\"If objFSO.FileExists(strPhotoFilePath) Then	 'Copy file to its destination	 Dim objFileCopy As Object = objFSO.GetFile(strPhotoFilePath)	 objFileCopy.Copy(strPhotoDestination)	 objFileCopy = nothingEnd If

Thanks for any help.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...