Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi Reader ;)

 

I've got I question about a fileupload control.

 

In my webapp. I've got a fileuploadcontol that uploads the file to a folder on the webserver ( eg. C:\Inetpub\wwwroot\UploadedFiles) NOW.... what i want is.. if a file is uploaded it is uploaded to another server ( the server where the webapp runs on is eg myserver so the upload folder is myserver\uploadedfiles and i want it to be stackserver\files )

 

I would like to do this because the webserver has virtualy no HD space and the stack server has several TB (:D:0)

 

any idears???

 

Tnx

Mrb

Posted

Found it :)

 

here is the code

 

    
'-- Moving a file
       Dim fs, f
       fs = Server.CreateObject("Scripting.FileSystemObject")
       f = fs.GetFile("c:\test.txt")
       f.Move("\\Myserver\Uploads\test.txt")
       f = Nothing
       fs = Nothing
'-- Moving a folder
       Dim fs, fo
       fs = Server.CreateObject("Scripting.FileSystemObject")
       fo = fs.GetFolder("c:\test")
       fo.Move("c:\asp\test")
       fo = Nothing
       fs = Nothing

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...