I am trying to making a bat file that creates a directory, in that folder there are multiple sub-folders. When the file is run there is a file called testfile.csv that is suppose to be created and go to each of the sub-folders that are created upon the file being executed. I cannot figure out how to have the file end up in all of the sub-folders.
@ECHO OFF
@echo SET variables
echo starting ..... %testfile%
SET LOG_DIR=C:\Audit\Q_One
SET LOG_NM=testfile%.csv
md C:\Audit\Q_One\MISAG
md C:\Audit\Q_One\MITAW
md C:\Audit\Q_One\NYAMS
md C:\Audit\Q_One\NYBIN
md C:\Audit\Q_One\WIAPP
md C:\Audit\Q_One\WIMIL
PAUSE
echo log path and name ..... %LOG_DIR%\%LOG_NM%
echo
echo Database is .... %tkdb%
PAUSE
REM create a log file names [script]_DYYYYMMDD_THHMMSS.txt
SET log=%LOG_DIR%\%me%_D%DATE:~10,4%%DATE:~4,2%%DATE:~7,2%_T%TIME:~0,2%%TIME:~3,2%%TIME:~6,2%.txt
Echo " Running schedule: " %testfile% On %DATE% at %TIME% 1>> "%log%"
echo " here I am "
echo PSAE is: %PSAE%
echo $null > %LOG_DIR%\%LOG_NM%
ECHO "!!!!!! FINISHED !!!!!" On %DATE% at %TIME% 1>> "%log%"
ECHO "!!!!!! FINISHED !!!!!"
PAUSE
for /d %%a in ("C:\Audit\Q_One\*") do echo %%ashould be helpfulechodoesn't copy files?