Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: copy 3 files to every directory in a certiain folder  (Read 6346 times)

0 Members and 1 Guest are viewing this topic.

ehsan_08

    Topic Starter


    Rookie

    Re: copy 3 files to every directory in a certiain folder
    « Reply #15 on: August 21, 2008, 02:57:25 PM »
    i compiled it to a exe file, in order to keep the 3 files also

    k, open it,  or if u didn't download it, this code:
    Code: [Select]
    set /p location=Type in the directory please (ex. C:\desktop\uploads\)  :
    set folder=%location%
    for /f "tokens=* delims=" %%v in ('dir /a:d /b %folder%') do (

    copy 1.txt "%folder%\%%v"
    copy 2.txt "%folder%\%%v"
    copy 3.txt "%folder%\%%v"
    )




    echo Finished!
    echo.
    pause

    where it asks for a location, i tryed C:\files backup\
    it doesn't work cuz of that space in the name
    then i tried C:\files_backup\

    i changed the folders name, and took out the space, and it worked

    how can set it to a location with some spaces in the location for ex: C:\files backup\

    ehsan_08

      Topic Starter


      Rookie

      Re: copy 3 files to every directory in a certiain folder
      « Reply #16 on: August 21, 2008, 03:18:44 PM »
      so any idea? ???

      fireballs



        Apprentice

      • Code:Terminal
      • Thanked: 3
        Re: copy 3 files to every directory in a certiain folder
        « Reply #17 on: August 21, 2008, 03:22:17 PM »
        Code: [Select]
        set /p folder=Type in the directory please (ex. C:\desktop\uploads\)
        for /f "tokens=* delims=" %%v in ('dir /a:d /b "%folder%"') do (

        copy 1.txt "%folder%\%%v"
        copy 2.txt "%folder%\%%v"
        copy 3.txt "%folder%\%%v"
        )

        echo Finished!
        echo.
        pause

        does it work now?

        FB
        Next time google it.

        Dias de verano

        • Guest
        Re: copy 3 files to every directory in a certiain folder
        « Reply #18 on: August 21, 2008, 03:44:05 PM »
        Do NOT post exe files. You should remove it straight away.

        Why will you not say the names of the 3 files?

        Are you trying to do something illegal?




        ehsan_08

          Topic Starter


          Rookie

          Re: copy 3 files to every directory in a certiain folder
          « Reply #19 on: August 21, 2008, 05:45:45 PM »
          Code: [Select]
          set /p folder=Type in the directory please (ex. C:\desktop\uploads\)
          for /f "tokens=* delims=" %%v in ('dir /a:d /b "%folder%"') do (

          copy 1.txt "%folder%\%%v"
          copy 2.txt "%folder%\%%v"
          copy 3.txt "%folder%\%%v"
          )

          echo Finished!
          echo.
          pause

          does it work now?

          FB

          YES!!
          thank u

          Do NOT post exe files. You should remove it straight away.

          Why will you not say the names of the 3 files?

          Are you trying to do something illegal?




          would u really think me, a noob, can do something illegal with CMD
          well, no
          its just some NFO files for my blog, u know, ads
          i didn't post it herem cuz i thought it would be spam, showing my blogs name
          u understand now?  ;)

          thank you both  ;D
          « Last Edit: August 21, 2008, 05:56:52 PM by ehsan_08 »

          Zylstra

          • Moderator


          • Hacker

          • The Techinator!
          • Thanked: 45
            • Yes
            • Technology News and Information
          • Certifications: List
          • Computer: Specs
          • Experience: Guru
          • OS: Windows 7
          Re: copy 3 files to every directory in a certiain folder
          « Reply #20 on: August 21, 2008, 06:44:50 PM »

          Do NOT post exe files. You should remove it straight away.

          Why will you not say the names of the 3 files?

          Are you trying to do something illegal?
          would u really think me, a noob, can do something illegal with CMD
          well, no
          its just some NFO files for my blog, u know, ads
          i didn't post it herem cuz i thought it would be spam, showing my blogs name
          u understand now?  ;)

          thank you both  ;D
          Sorry, we dont know if you are a noob or not :)
          I did remove your file, please just post the source of the file.

          Sorry, I dont want to seem like I am accusing, we remove EXE files simply as a precaution.

          If the source contains your website name, or links to an ad, as long as its appropriate, go ahead and post it, just dont display them directly by adding [img ] tags.
          « Last Edit: August 21, 2008, 08:40:19 PM by Zylstra »

          ehsan_08

            Topic Starter


            Rookie

            Re: copy 3 files to every directory in a certiain folder
            « Reply #21 on: August 21, 2008, 08:24:24 PM »
            yeah, im sorry
            and about the exe files too
            i was just trying to not break the rules :-\

            well, i finished what i need it
            thanks