Ony copy files and sub-folder in a folder to another
Hi all,
I have the folders and files as structure
|Folder A
| | Folder A1
| | | FileA1A.txt
| | | FileA1B.txt
| | FileA.txt
| | FileB.pdf
and I only want to copy all files and folders under the folderA to Folder B as structure below
|Folder B
| | Folder A1
| | | FileA1A.txt
| | | FileA1B.txt
| | FileA.txt
| | FileB.pdf
If I use these code
var FolInfo = aqFileSystem.GetFolderInfo(FolderAPath);
// Copies the folder to another location
FolInfo.Copy(FolderB, false);
It will copy all files and folders include FolderA into FolderB as below. But I don't the copy the root folder name (Folder A)
FolderB
|Folder A
| | Folder A1
| | | FileA1A.txt
| | | FileA1B.txt
| | FileA.txt
| | FileB.pdf
Thanks,
Vinh
Hi,
Consider WshShell.Run() and xcopy command (https://stackoverflow.com/questions/7170683/copy-all-files-and-folders-from-one-drive-to-another-drive-using-dos-command-pr)