Is there a way to do this? I have the following:
@echo off
setlocal
for /d /r "someDirectoryPath" %%D in (.) do (
cd "%%D"
copy *+
)
However, it does not get files in subfolders of the main directory; it only gets files in the same directory as the script. For example, if I have:
someDirectoryPath
│
└───folder1
│ │ file011.txt
│ │ file012.txt
│ │
│ └───subfolder1
│ │ file111.txt
│ │ file112.txt
│ │ ...
│
└───folder2
│ file021.txt
│ file022.txt
I would want the batch script inside the main directory, and every file/folder inside that would be updated. Is there a simple way to do this?