title: Create file and send to multiple folders in batch?
body: <p>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. </p>
  
  <pre><code>@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&gt;&gt; "%log%"
  echo " here I am "
  echo PSAE is: %PSAE%
  
  echo $null &gt; %LOG_DIR%\%LOG_NM%
  
  ECHO "!!!!!!  FINISHED !!!!!"  On %DATE% at %TIME% 1&gt;&gt; "%log%"
  ECHO "!!!!!!  FINISHED !!!!!"
  
  PAUSE
  </code></pre>