How can i traverse all my files and the subfolders and once that done I need to print the logfile.txt and after be able to copy and replace or copy and overwrite the existing folder, maintaining the same structure. Any Help for this will be much appreciared...
For example;
for /r %%f in (*) do echo %%f
pause
echo %date%, %time%: D:\Data\PS\IT test > logfile.txt
dir >> logfile.txt
pause
XCOPY "D:\Data\PS\*.*" "D:\Data\PS\IT test\" /S /Y /I /E /P
pause