I want to move all files and subdirectories including files to another subdirectory of the same folder.
e.g. I have folder named abcd inside I have a file aa and subfolders bb, cc, dd. SO I would like to create another subdirectory inside the same folder as abcd\backup and move aa, bb, cc, dd i.e. all files and folder to backup folder.
This is gonna be very simple.
Directory.Move("SourcePath", "DestinationPath");
Process all directories in the source folder and use the above syntax for each and every folder using forloop or foreach to move to your destination folder.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With