Do 2 things at once with bat files

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

  1. myuusmeow
    OP

    myuusmeow GBAtemp Advanced Maniac

    Member
    1,643
    0
    Jun 24, 2007
    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

    juggernaut911 GBAtemp Slut!

    Member
    4,153
    21
    Jul 13, 2006
    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

    Richy Freeway GBAtemp Advanced Fan

    Member
    776
    5
    Oct 9, 2006
    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

    matriculated GBAtemp Advanced Fan

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

    Richy Freeway GBAtemp Advanced Fan

    Member
    776
    5
    Oct 9, 2006
    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.