W
William S
I know there a few different and probably betters way to accomplish what I'm
doing.
I've got file a network drive, that I want to copy to my local drive, and I
want to keep the same path (UNC) structure.
For instance, I've got ...
z:\parentfolder\subfolder1\subfolder2\file1.txt
z:\parentfolder\subfolder1\subfolder2\file2.txt
z:\parentfolder\subfolder1\subfolder2\file3.txt
and i want to move everything to my local disk so I'll have
c:\parentfolder\subfolder1\subfolder2\file1.txt
c:\parentfolder\subfolder1\subfolder2\file2.txt
c:\parentfolder\subfolder1\subfolder2\file3.txt
I've written code to recursively get the folder names then apending them to
a string, then written another recursive function to create that folder
structure on my local disk, then with a for loop I copy the file from source
to destination.
This seem like a lot of code, and time to me when I think .NET should
provide some easier methods to accomplish such a trivial task. Maybe I'm
missing something.
Thanks for reading
doing.
I've got file a network drive, that I want to copy to my local drive, and I
want to keep the same path (UNC) structure.
For instance, I've got ...
z:\parentfolder\subfolder1\subfolder2\file1.txt
z:\parentfolder\subfolder1\subfolder2\file2.txt
z:\parentfolder\subfolder1\subfolder2\file3.txt
and i want to move everything to my local disk so I'll have
c:\parentfolder\subfolder1\subfolder2\file1.txt
c:\parentfolder\subfolder1\subfolder2\file2.txt
c:\parentfolder\subfolder1\subfolder2\file3.txt
I've written code to recursively get the folder names then apending them to
a string, then written another recursive function to create that folder
structure on my local disk, then with a for loop I copy the file from source
to destination.
This seem like a lot of code, and time to me when I think .NET should
provide some easier methods to accomplish such a trivial task. Maybe I'm
missing something.
Thanks for reading