I have currently created the following code, it works fine to copy the contents within the folder 'C:\metadata_home\met_source\metadata\' BUT I need to copy the folder as well. When I use the syntax: copy "C:\metadata_home\met_source\" "%%~ff" it throws up an error saying 'The system cannot find the file specified.'
Setlocal EnableDelayedExpansion
cls
set currentDirectory=%CD%
FOR /D %%g IN ("C:\metadata_home\met_dest\*") DO (
Pushd %CD%\%%g
FOR /D %%f IN ("C:\metadata_home\met_dest\*") DO (
copy "C:\metadata_home\met_source\metadata\" "%%~ff"
)
Popd
)
pause
Please help I am banging my head against the wall on this one!