I have the following structure
- folder1
- file1
- folder2
- file2
- folder3
- file3
- file4
- file5
- folder4
- file6
- folder5
- file7
- folder5
- file8
I am trying to copy all the file and the folders to a different directory but what happens is that the folders (folder 1, 2, 3) are copied; within folder 3 are all the corresponding files (file3, file4, and file5) but file1 and file2 which files in folder 1 and folder 2 are left out in the copy.
Below is the powershell code snippet i use:
Copy-Item -Path c:\folder1\folder2\folder3\* -Destination d:\ -Recurse -Verbose
"c:\folder 1\folder 2\folder 3\*". To rephrase, are you looking to copy everything within "Folder 1" to "*d:*"?file1&file2to be copied? they are NOT in the specified source dir ... [frown]-Recurseparameter not causefile1&file2to be copied since they are along the path/level offolder3?