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

Author Topic: .bat that opens all .bat files in the subfolders of its folder  (Read 6147 times)

0 Members and 1 Guest are viewing this topic.

Sir.Laggalot

  • Guest
The subject pretty much tells it all

I am working on Windows XP, I would prefer not to download any thing and it would be nice for you to explain how it works if you can.

I am Working on a bat which will hide files within the folder it is in. I want a master bat to open all of them at once.

It would also be nice if it could do this with the bats being hidden.

ghostdog74



    Specialist

    Thanked: 27
    Re: .bat that opens all .bat files in the subfolders of its folder
    « Reply #1 on: August 25, 2007, 08:40:16 PM »
    what have you got so far...

    Sir.Laggalot

    • Guest
    Re: .bat that opens all .bat files in the subfolders of its folder
    « Reply #2 on: August 25, 2007, 08:42:02 PM »
    I dont have any thing so far, i have been working on the hider, (the program it is opening)

    The program is such.. (a neater version then before)

    @ ECHO OFF
    title Image Concealer
    :: A Sir.Laggalot Creation

    IF EXIST *.jpg. GOTO HIDE
     IF EXIST *.gif. GOTO HIDE
      IF EXIST *.png. GOTO HIDE
       IF EXIST *.mp3. GOTO FIX
        IF EXIST *.mp4. GOTO FIX
         IF EXIST *.avi. GOTO FIX
          ECHO.
          ECHO ERROR-
          ECHO There are no .jpg, .gif, .png, .mp3, .mp4, or .avi files to effect.
          ECHO.
          ECHO.
           PAUSE
            GOTO END
    :HIDE
     REN *.jpg *.mp3
      ATTRIB "./*.mp3" +h
       REN *.gif *.mp4
        ATTRIB "./*.mp4" +h
         REN *.png *.avi
          ATTRIB "./*.avi" +h
           GOTO END
    :FIX
    ATTRIB "./*.mp3" -h
     REN *.mp3 *.jpg
      ATTRIB "./*.mp4" -h
       REN *.mp4 *.gif
        ATTRIB "./*.avi" -h
         REN *.avi *.png
          GOTO END
    :END

    Carbon Dudeoxide

    • Global Moderator

    • Mastermind
    • Thanked: 169
      • Yes
      • Yes
      • Yes
    • Certifications: List
    • Experience: Guru
    • OS: Mac OS
    Re: .bat that opens all .bat files in the subfolders of its folder
    « Reply #3 on: August 26, 2007, 05:39:18 AM »
    And you want to....open all those files at once?

    Quote
    I want a master bat to open all of them at once.

    Sir.Laggalot

    • Guest
    Re: .bat that opens all .bat files in the subfolders of its folder
    « Reply #4 on: August 26, 2007, 01:58:36 PM »
    I got a rough way to do it now but i want a bat file which will find all bat files of a certain name or not in the subfolders of a folder and execute them.

    ray.tomar

    • Guest
    Re: .bat that opens all .bat files in the subfolders of its folder
    « Reply #5 on: August 28, 2007, 03:49:51 PM »
    Hi, I hope this will help you out.

    You can use the ATTRIB command to protect as well as hide all the files inside any directory.

    you can use this command to hide.

    ATTRIB +s +r +h *.*

    In order to run each .bat file you can use CALL batchfilename.bat command in master batch file to run individual batch files.

    In fact you can also use START batchfilename.bat command to start a new window for running batch files.