Question

  • Creator
    Topic
  • #2148359

    Copy a file into every directory

    Locked

    by jocar7 ·

    Is there a way to copy a .txt file into every folder, but only two level
    down. The alldone.txt resides @ d:\IMS\alldone.txt. I need it to be
    copied to d:\IMS\PACS\”Physician’s Name”\*.*. I would prefer a batch file
    os a script, something that I can set as a scheduled task.

All Answers

  • Author
    Replies
    • #2567356

      Clarifications

      by jocar7 ·

      In reply to Copy a file into every directory

      Clarifications

    • #2565833

      Try this

      by rob miners ·

      In reply to Copy a file into every directory

      You will have to create a list of the Doctors in notepad to reflect the folder names and save it to the IMS folder as DR.txt
      EG:
      Dr.txt
      ==========
      Dr Jones
      Dr Bob
      ==========

      Copy and paste the line below into notepad and save it to the IMS folder as finnish.bat

      for /f “delims=” %%i in (dr.txt) do echo D|xcopy “d:\IMS\alldone.txt” “d:\IMS\PACS\%%i” /i /z /y

Viewing 1 reply thread