I am having trouble copying all .txt files from a folder(which has one sub_folder) into a different folder. I went through most of the existing threads and this is what I tried,
xcopy /s %logfolder%\*.txt %monthlylogcopy%\
for /R %logfolder% %f in (*.txt) do copy %f %monthylcopy%\
Result: In both these cases, only 1 .txt file is always copied from source to destination. There are over 20 .txt files in the folder and sub-folder.
NOTE: Used single '%' in 2) because I was running it in cmd.
PLease let me know what I am missing. Thank you in advance.