• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 00:06
CEST 06:06
KST 13:06
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
HomeStory Cup 27 - Info & Preview18Classic wins Code S Season 2 (2025)16Code S RO4 & Finals Preview: herO, Rogue, Classic, GuMiho0TL Team Map Contest #5: Presented by Monster Energy6Code S RO8 Preview: herO, Zoun, Bunny, Classic7
Community News
Weekly Cups (June 23-29): Reynor in world title form?6FEL Cracov 2025 (July 27) - $8000 live event13Esports World Cup 2025 - Final Player Roster14Weekly Cups (June 16-22): Clem strikes back1Weekly Cups (June 9-15): herO doubles on GSL week4
StarCraft 2
General
StarCraft Mass Recall: SC1 campaigns on SC2 thread The SCII GOAT: A statistical Evaluation Weekly Cups (June 23-29): Reynor in world title form? How does the number of casters affect your enjoyment of esports? Esports World Cup 2025 - Final Player Roster
Tourneys
HomeStory Cup 27 (June 27-29) WardiTV Mondays SOOPer7s Showmatches 2025 FEL Cracov 2025 (July 27) - $8000 live event $200 Biweekly - StarCraft Evolution League #1
Strategy
How did i lose this ZvP, whats the proper response Simple Questions Simple Answers [G] Darkgrid Layout
Custom Maps
[UMS] Zillion Zerglings
External Content
Mutation # 480 Moths to the Flame Mutation # 479 Worn Out Welcome Mutation # 478 Instant Karma Mutation # 477 Slow and Steady
Brood War
General
BGH Auto Balance -> http://bghmmr.eu/ BW General Discussion StarCraft & BroodWar Campaign Speedrun Quest ASL20 Preliminary Maps Unit and Spell Similarities
Tourneys
[BSL20] GosuLeague RO16 - Tue & Wed 20:00+CET The Casual Games of the Week Thread [Megathread] Daily Proleagues [BSL20] ProLeague LB Final - Saturday 20:00 CET
Strategy
Simple Questions, Simple Answers I am doing this better than progamers do.
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread Path of Exile What do you want from future RTS games? Beyond All Reason
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
US Politics Mega-thread Stop Killing Games - European Citizens Initiative Trading/Investing Thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread
Fan Clubs
SKT1 Classic Fan Club! Maru Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece [\m/] Heavy Metal Thread Korean Music Discussion
Sports
2024 - 2025 Football Thread Formula 1 Discussion NBA General Discussion TeamLiquid Health and Fitness Initiative For 2023 NHL Playoffs 2024
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
from making sc maps to makin…
Husyelt
Blog #2
tankgirl
Game Sound vs. Music: The Im…
TrAiDoS
StarCraft improvement
iopq
Heero Yuy & the Tax…
KrillinFromwales
Trip to the Zoo
micronesia
Customize Sidebar...

Website Feedback

Closed Threads



Active: 591 users

How to: Never have to save a replay again... - Page 4

Forum Index > SC2 General
Post a Reply
Prev 1 2 3 4 5 Next All
Blahman
Profile Joined July 2010
United States40 Posts
Last Edited: 2010-08-01 07:58:43
August 01 2010 07:58 GMT
#61
Thanks for your kind words guys!

I updated the original post with a step by step guide for setting up the task in Windows 7/Vista, since I had a request for better instructions. If anyone has set up a task in XP that works for them please post how they did it, since it is very different.
Blahman
Profile Joined July 2010
United States40 Posts
August 01 2010 08:33 GMT
#62
Never mind think I figured it out. Updated my post with an XP guide.
TehForce
Profile Joined July 2010
1072 Posts
Last Edited: 2010-08-01 13:16:47
August 01 2010 11:51 GMT
#63
Thx Blahman, for your script, its really great.

But, i dont like having this process running everytime i start my computer, because you don't need it when you dont play SC2..

This is why i wrote this.

Instead of using the invisible.vbs and the Windows Task Scheduler, i just wrote this startup.bat


@echo off
echo >%TEMP%\sleep.vbs wscript.sleep 300000
call "D:\Games\StarCraft II\StarCraft II.exe"
:wait
cscript %TEMP%\sleep.vbs

tasklist /FI "IMAGENAME eq SC2.exe" 2>NUL | find /I /N "SC2.exe">NUL
if "%ERRORLEVEL%"=="0" (
echo SC2 is running
call "D:\Games\StarCraft II\ReplayCopy\copyReplay.bat"
goto wait
)
call "D:\Games\StarCraft II\ReplayCopy\copyReplay.bat"
del %TEMP%\sleep.vbs
exit


It basically waits 5 Minutes, then checks if Starcraft2 is still running and executes the replayscript. If it is not running it exits.

Then i just made a shortcut to it on my desktop and now the process which checks for new SC2 replays is only running when i really play SC2.

You have to adjust the Path to your SC2 and copyReplay.bat of course.
NesTea <3
Rags
Profile Joined July 2010
Sweden11 Posts
August 01 2010 12:19 GMT
#64
Just tried with the new updated stuff, both for windows 7/vista and the CEST localization, and it works like a charm.
Thank you, much appreciated
Kambo_Rambo
Profile Joined May 2010
Australia79 Posts
August 01 2010 13:51 GMT
#65
I believe the reason for the change was because I had over 300 replays in recent, so whenever i clicked on the replay button it would attempt to load headers of each file/file names causing a 5 second freeze.
You require more vespene minerals?
Blahman
Profile Joined July 2010
United States40 Posts
August 01 2010 17:52 GMT
#66
On August 01 2010 20:51 TehForce wrote:
Thx Blahman, for your script, its really great.

But, i dont like having this process running everytime i start my computer, because you don't need it when you dont play SC2..

This is why i wrote this.

Instead of using the invisible.vbs and the Windows Task Scheduler, i just wrote this startup.bat


@echo off
echo >%TEMP%\sleep.vbs wscript.sleep 300000
call "D:\Games\StarCraft II\StarCraft II.exe"
:wait
cscript %TEMP%\sleep.vbs

tasklist /FI "IMAGENAME eq SC2.exe" 2>NUL | find /I /N "SC2.exe">NUL
if "%ERRORLEVEL%"=="0" (
echo SC2 is running
call "D:\Games\StarCraft II\ReplayCopy\copyReplay.bat"
goto wait
)
call "D:\Games\StarCraft II\ReplayCopy\copyReplay.bat"
del %TEMP%\sleep.vbs
exit


It basically waits 5 Minutes, then checks if Starcraft2 is still running and executes the replayscript. If it is not running it exits.

Then i just made a shortcut to it on my desktop and now the process which checks for new SC2 replays is only running when i really play SC2.

You have to adjust the Path to your SC2 and copyReplay.bat of course.


Very interesting solution there. Personally I don't mind it running every 5 minutes even when I'm not playing SC2, because there will be nothing to copy and it runs and exits instantaneously, using up practically zero resources.

There are probably better ways to have the script only run when SC2 is running without launching SC2 through a batch file. In fact you could just tweak the main copyReplay.bat file to only execute the main loop if SC2 is running. However when I initially wrote the script it was also meant to be used outside of SC2 for mass renaming previously saved replays.
RodrigoX
Profile Joined November 2009
United States645 Posts
Last Edited: 2010-08-02 00:24:08
August 01 2010 23:56 GMT
#67
Okay thank you blahman you are amazing! Thank you!

Gahh, Im having more problems, Getting an error. Messaging you blah
We were all raised on televion that made us believe we'd all be Millionairs, Movie gods, and Rockstars..... But we won't.... We are slowly learning that fact. And we are very, very pissed off.
Tenrou
Profile Joined March 2010
United States38 Posts
August 05 2010 08:21 GMT
#68
This was exactly what I was looking for. Thanks =D
Chronopolis
Profile Joined April 2009
Canada1484 Posts
August 06 2010 05:12 GMT
#69
I was trying to set this up but..
I keep getting an error everytime the task runs:

Script: C:\Users\MyAccount\Desktop\invisible.vbs
Line: 1
Char: 1
Error: The system cannot find the file specified
Code: 80070002
Source: (null)
Blahman
Profile Joined July 2010
United States40 Posts
August 06 2010 06:18 GMT
#70
need more info, you can probably figure it out yourself, just read the instructions carefully make sure you have entered the arguments correctly (quotes are important).
Chronopolis
Profile Joined April 2009
Canada1484 Posts
August 06 2010 17:53 GMT
#71
On August 06 2010 15:18 Blahman wrote:
need more info, you can probably figure it out yourself, just read the instructions carefully make sure you have entered the arguments correctly (quotes are important).


Got everything fixed up, thanks a lot for making a fix for this!
NukeTheBunnys
Profile Joined July 2010
United States1004 Posts
August 06 2010 17:55 GMT
#72
there is another way that I find even easyer. SC2Gears can automatically save replays as of version 1.51 and it does a lot of other awesome stuff
When you play the game of drones you win or you die.
Blahman
Profile Joined July 2010
United States40 Posts
August 08 2010 07:47 GMT
#73
yeah SC2Gears is pretty sweet. haven't played with the autosave thing though.

still, it's an extra download and process running, and I like the way my files are named when they're saved. not sure how SC2Gears names its saves.
carwashguy
Profile Joined June 2009
United States175 Posts
Last Edited: 2010-08-08 22:01:18
August 08 2010 22:00 GMT
#74
Thank you Blahman! Your instructions are very thorough, and it works like a charm! I prefer this solution over SC2Gears (in regards to autosaving), since I'd need to keep SC2Gears running for it to autosave.

TehForce, that sounds like a good idea, but I'm worried about quitting right after finishing a game and the autosave won't trigger. And like Blahman says, it doesn't seem to eat up any resources.

I take it the only conditions where SC2 will obsolete this solution is by changing the folder structure (unlikely) or changing the file naming convention.
Blahman
Profile Joined July 2010
United States40 Posts
Last Edited: 2010-08-09 05:16:28
August 09 2010 05:16 GMT
#75
Glad you like it! I don't think either of those would make it obsolete, you'd just have to tweak your source and destination paths in the first case, and in the second case I would probably have to tweak the code that parses the name before renaming it. The only thing they could do to make it obsolete is to just never delete any replays ever (like in the beta)!
Dexerion
Profile Joined May 2010
United States43 Posts
September 03 2010 20:36 GMT
#76
OMG So awesome. I used to make some crude .bat files back in the day and I was about to try and write another to find a solution to the replay problem in SC2. Instead I googled "batch file to automatically save starcraft 2 replays" and this was the 1st hit.

Great great work. Amazing. You sir, are to be commended.
Blahman
Profile Joined July 2010
United States40 Posts
September 04 2010 21:46 GMT
#77
Hey thanks man, enjoy!
Tobit
Profile Joined May 2010
United States3 Posts
September 09 2010 19:41 GMT
#78
Awesome, thanks a bunch for this. I was trying to do something similar with a backup/syncing program, but wasn't able to rename the files. I found SC2Gears, which is awesome for replay analysis, searching, etc, but takes up a lot of resources since it's in Java. This is the perfect solution.

One thing I wanted was the ability to have the files automatically placed into subdirectories by the year and month. It turned out to be harder than I thought, but that's just because I don't know much of anything about scripting. I got it to work, but I was wondering if you (Blahman) have a particular site you go to for looking up scripting stuff? I think the majority of my problems arose from not understanding the difference between using the percent sign (%) around variables and using exclamation points (!). Which I still don't understand, I just used what worked.

For anyone interested, here's the revised script:
+ Show Spoiler +

@echo off
SETLOCAL ENABLEDELAYEDEXPANSION

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::
:: Script to automatically copy or move SC2Replay files from the
:: Unsaved folder to the Multiplayer folder (or wherever you want).
::
:: NOTE: Set the "source" and "destination" paths for your account.
:: Set "action" to "move" if you want to move the files, or
:: "copy" to copy them.
::
:: Will not overwrite any existing files and names files uniquely
:: based on the date and time they were created.
::
:: NOTE! The date parser will work for most locales but not all.
::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

set source=C:\Users\USER\Documents\StarCraft II\Accounts\12345\1-A1-1-12345\Replays\Unsaved
set destination=C:\Users\USER\Documents\StarCraft II\Accounts\12345\1-A1-1-12345\Replays\Multiplayer
set action=move

REM Gets date/time format information from registry
FOR /F "tokens=3" %%A IN ('REG QUERY "HKEY_CURRENT_USER\Control Panel\International" /v iTime 2^>NUL') DO SET iTime=%%A
FOR /F "tokens=3" %%A IN ('REG QUERY "HKEY_CURRENT_USER\Control Panel\International" /v sDate 2^>NUL') DO SET sDate=%%A
FOR /F "tokens=3" %%A IN ('REG QUERY "HKEY_CURRENT_USER\Control Panel\International" /v sTime 2^>NUL') DO SET sTime=%%A
FOR /F "tokens=3" %%A IN ('REG QUERY "HKEY_CURRENT_USER\Control Panel\International" /v s1159 2^>NUL') DO SET s1159=%%A

REM Gets the list of files to copy from the source folder, doesn't actually copy yet
for /f "usebackq tokens=*" %%a in (`xcopy "%source%" "%destination%" /L /Y /I`) do (
if exist "%%a" (
REM Gets rid of number in parentheses after replay name
if %%~xa==.SC2Replay (
for /f "delims=0123456789( tokens=1" %%b in ("%%~na") do (
REM Gets rid of trailing space
set baseName=%%b##
set baseName=!baseName: ##=##!
set baseName=!baseName:##=!
)
REM Gets date/time modified.
REM Universal Date/Time parser
REM Works for most locales but not 100%

for /f "tokens=1*" %%c in ("%%~ta") do (
set modDate=%%c
set modTime=%%d
)

call :Get_Date
call :Get_Time

REM Output time format string - feel free to adjust
REM Note, destFolder gives a year-month folder structure for replay storage
set destTime=!yy!-!mm!-!dd! !hh!!mn!
set destFolder=!yy!-!mm!
set datedest=%destination%\!destFolder!

if not exist "!datedest!" %comspec% nul /cmd "!datedest!"

REM I like the date first so files sort by date automatically
set output=!datedest!\!destTime! !baseName!.SC2Replay

if not exist "!output!" (
if "%action%"=="copy" (
echo Copying "%%a" to "!output!"...
copy "%%a" "!output!" /Y
) else (
echo Moving "%%a" to "!output!"...
move /Y "%%a" "!output!"
)
)
)
)
)
:: Uncomment next line to prompt you to hit a key before exiting so you can examine output
REM pause
goto :eof

:Get_Date
if "%modDate%A" LSS "A" (set toks=1-3) else (set toks=2-4)
for /f "usebackq skip=1 tokens=2-4 delims=(-)" %%a in (`echo:^|date`) do (
for /f "usebackq tokens=%toks% delims=%sDate% " %%d in ('%modDate%') do (
set %%a=%%d
set %%b=%%e
set %%c=%%f
set toks=
)
)
goto :eof

:Get_Time
if "%modTime%A" LSS "A" (set toks=3) else (set toks=1)
for /f "usebackq tokens=%toks% delims=%sTime% " %%a in ('%modTime%') do (set AMPM=%%a)
if "%modTime%A" LSS "A" (set toks=1-2) else (set toks=2-3)
for /f "usebackq tokens=%toks% delims=%sTime% " %%a in ('%modTime%') do (
set hh=%%a
set mn=%%b
if "!AMPM!"=="AM" (
set s1159=AM
set iTime=0
) else (
if "!AMPM!"=="PM" (
set iTime=0
)
)
if "!iTime!"=="0" (
if "!AMPM!"=="%s1159%" (
if "!hh!"=="12" set hh=00
) else (
if "!hh:~0,1!"=="0" set hh=!hh:~1,1!
if not "!hh!"=="12" set /A hh=!hh!+12
)
)
set AMPM=
set toks=
)
goto :eof
Blahman
Profile Joined July 2010
United States40 Posts
Last Edited: 2010-09-10 02:22:55
September 10 2010 02:15 GMT
#79
Very nice, I prefer mine all in one folder but this is a good idea.

As for batch scripting reference, there are several good sites out there. My favorite is http://www.robvanderwoude.com/batchfiles.php

For most of the tricky date stuff I used: http://www.robvanderwoude.com/datetimentparse.php
and http://www.robvanderwoude.com/amb_datetime.php

As for "%" vs "!", this has to do with something called delayed variable expansion in FOR loops: http://www.robvanderwoude.com/variableexpansion.php
sid17
Profile Joined July 2010
1 Post
September 10 2010 04:57 GMT
#80
Hey, the bat file for me works perfectly but the vbs script keeps giving me the error

Script C:\user\etc etc
Line: 1
Char: 1
Error: Type mismatch: 'Code'
Code: 800A000D
Source Microsoft VBScript runtime error

i tried deleting the "code" line but then i got an error about subscripts. The bat file works great though and saves me tons of time ^^
Prev 1 2 3 4 5 Next All
Please log in or register to reply.
Live Events Refresh
Replay Cast
00:00
DH Dallas | TheStC Showmatch
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
PiGStarcraft490
StarCraft: Brood War
Noble 33
Icarus 7
Dota 2
monkeys_forever805
League of Legends
JimRising 748
Counter-Strike
summit1g9504
Stewie2K382
Other Games
shahzam916
FrodaN586
Maynarde170
kaitlyn64
Mew2King53
NeuroSwarm53
RuFF_SC222
Organizations
Other Games
gamesdonequick1384
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 13 non-featured ]
StarCraft 2
• practicex 87
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Rush548
• Stunt437
Upcoming Events
Wardi Open
6h 54m
PiGosaur Monday
19h 54m
The PondCast
1d 5h
Replay Cast
1d 19h
RSL Revival
2 days
WardiTV European League
2 days
Replay Cast
2 days
RSL Revival
3 days
WardiTV European League
3 days
FEL
3 days
[ Show More ]
Korean StarCraft League
3 days
CranKy Ducklings
4 days
RSL Revival
4 days
FEL
4 days
Sparkling Tuna Cup
5 days
RSL Revival
5 days
FEL
5 days
BSL: ProLeague
5 days
Dewalt vs Bonyth
Replay Cast
6 days
Liquipedia Results

Completed

Proleague 2025-06-28
HSC XXVII
Heroes 10 EU

Ongoing

JPL Season 2
BSL 2v2 Season 3
BSL Season 20
Acropolis #3
KCM Race Survival 2025 Season 2
CSL 17: 2025 SUMMER
Copa Latinoamericana 4
Championship of Russia 2025
RSL Revival: Season 1
Murky Cup #2
BLAST.tv Austin Major 2025
ESL Impact League Season 7
IEM Dallas 2025
PGL Astana 2025
Asian Champions League '25
BLAST Rivals Spring 2025
MESA Nomadic Masters
CCT Season 2 Global Finals
IEM Melbourne 2025
YaLLa Compass Qatar 2025

Upcoming

CSLPRO Last Chance 2025
CSLPRO Chat StarLAN 3
K-Championship
uThermal 2v2 Main Event
SEL Season 2 Championship
FEL Cracov 2025
Esports World Cup 2025
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.