Assume I have a directory structure as follows:
D:\TEST\IMGS (2012)
D:\TEST\IMGS 2012
D:\TEST\IMGS (2013)
D:\TEST\IMGS 2013
Each IMGS subfolder has file content. Why on earth does my batch script below not just copy the folders which have parentheses to C:\TEST? Instead it copies the files within a folder with parentheses.
@echo off
setlocal enabledelayedexpansion
for /d %%i in (D:\TEST\*(*) do (
set folder=%%i
echo !folder!
pause
xcopy "%%i" "C:\TEST" /i /s
)
pause
- Edited by CMJR1979 Tuesday, March 31, 2015 1:34 AM