Upload to multiple folder paths

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Upload to multiple folder paths

Guest-971

Hi Dean,

Is it possible to upload the once selected file to multiple folders? I tried using both the MoveTo and SaveAs methods, but the uploaded file is getting saved only in the last folder of the loop(I am looping through folders). When i debugged, I found this behaviour, the uploaded file is moved to first folder in the first loop, second folder in the second loop, 3rd in the 3rd loop and finally it reaches the last folder in the last loop. I even tried copying the Multifile object to another Multifile object and used the new Multifile object's UploadedFile in the MoveTo and SaveAs methods; but still that didnt work. Please help...

 

Reply | Threaded
Open this post in threaded view
|

Re: Upload to multiple folder paths

Dean Brettle
Administrator
Use the MoveTo() or SaveAs() method to save it to the first location and then use File.Copy() to copy it to additional locations. --Dean
Reply | Threaded
Open this post in threaded view
|

Re: Upload to multiple folder paths

Guest-971