Do 2 things at once with bat files

Discussion in 'Computer Games and General Discussion' started by myuusmeow, Jun 5, 2008.

Jun 5, 2008
  1. myuusmeow
    OP

    Member myuusmeow GBAtemp Advanced Maniac

    Joined:
    Jun 24, 2007
    Messages:
    1,643
    Country:
    United States
    Code:
    explorer.exe q:
    xcopy "q:\PSP\SAVEDATA\*" "c:\pspsaves\" /y /s
    7z.exe a -t7z c:\saves.7z "c:\pspsaves"
    rmdir /s /q "c:\pspsaves"
    That is my current autorun.bat that runs when I connect my PSP to my PC. One problem. It doesn't start copying/compressing until I close the Explorer window that pops up. If I put it the other way (copy/compress then open explorer) I have to wait for it all to copy then compress. It's only 30 seconds but it is sort of annoying. Any ways to make it do both at once?
     
  2. juggernaut911

    Member juggernaut911 GBAtemp Slut!

    Joined:
    Jul 13, 2006
    Messages:
    4,153
    Country:
    United States
    tell it to run 2 bats at connection?

    i have the same problem, i try to run 2 diff progs, but until it thinks the first process is done (closed) it wont continue
     
  3. Richy Freeway

    Member Richy Freeway GBAtemp Advanced Fan

    Joined:
    Oct 9, 2006
    Messages:
    776
    Country:
    United Kingdom
    I haven't tested this but try putting START before explorer.exe

    Been a long while since I've messed around with batch files, so that may not do anything [​IMG]

    Edit : Just tested it here, start fixes it.

    Code:
    start explorer.exe q:
    xcopy "q:\PSP\SAVEDATA\*" "c:\pspsaves\" /y /s
    7z.exe a -t7z c:\saves.7z "c:\pspsaves"
    rmdir /s /q "c:\pspsaves"
    Give it a go and let me know how it works.
     
  4. matriculated

    Member matriculated GBAtemp Advanced Fan

    Joined:
    Sep 27, 2007
    Messages:
    598
    Country:
    Canada
    Or put the explorer line at the end? Does it need to be first?
     
  5. Richy Freeway

    Member Richy Freeway GBAtemp Advanced Fan

    Joined:
    Oct 9, 2006
    Messages:
    776
    Country:
    United Kingdom
    He already mentioned that in his post. If he does that he has to wait for the copy/compress to finish before the explorer window opens.
     

Share This Page