• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 08:21
CET 14:21
KST 22:21
  • 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
Behind the Blue - Team Liquid History Book9Clem wins HomeStory Cup 289HomeStory Cup 28 - Info & Preview13Rongyi Cup S3 - Preview & Info6herO wins SC2 All-Star Invitational14
Community News
PIG STY FESTIVAL 7.0! (19 Feb - 1 Mar)9Weekly Cups (Jan 26-Feb 1): herO, Clem, ByuN, Classic win2RSL Season 4 announced for March-April7Weekly Cups (Jan 19-25): Bunny, Trigger, MaxPax win3Weekly Cups (Jan 12-18): herO, MaxPax, Solar win0
StarCraft 2
General
Behind the Blue - Team Liquid History Book How do you think the 5.0.15 balance patch (Oct 2025) for StarCraft II has affected the game? Rongyi Cup S3 - Preview & Info Clem wins HomeStory Cup 28 HomeStory Cup 28 - Info & Preview
Tourneys
PIG STY FESTIVAL 7.0! (19 Feb - 1 Mar) WardiTV Mondays $21,000 Rongyi Cup Season 3 announced (Jan 22-Feb 7) Sparkling Tuna Cup - Weekly Open Tournament $5,000 WardiTV Winter Championship 2026
Strategy
Custom Maps
Map Editor closed ? [A] Starcraft Sound Mod
External Content
Mutation # 512 Overclocked The PondCast: SC2 News & Results Mutation # 511 Temple of Rebirth Mutation # 510 Safety Violation
Brood War
General
[ASL21] Potential Map Candidates Liquipedia.net NEEDS editors for Brood War BGH Auto Balance -> http://bghmmr.eu/ BW General Discussion Can someone share very abbreviated BW cliffnotes?
Tourneys
[Megathread] Daily Proleagues Escore Tournament StarCraft Season 1 Small VOD Thread 2.0 KCM Race Survival 2026 Season 1
Strategy
Zealot bombing is no longer popular? Simple Questions, Simple Answers Current Meta Soma's 9 hatch build from ASL Game 2
Other Games
General Games
ZeroSpace Megathread Diablo 2 thread Battle Aces/David Kim RTS Megathread EVE Corporation Nintendo Switch Thread
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
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Vanilla Mini Mafia Mafia Game Mode Feedback/Ideas
Community
General
Russo-Ukrainian War Thread US Politics Mega-thread YouTube Thread The Games Industry And ATVI Things Aren’t Peaceful in Palestine
Fan Clubs
The herO Fan Club! The IdrA Fan Club
Media & Entertainment
[Manga] One Piece Anime Discussion Thread
Sports
2024 - 2026 Football Thread
World Cup 2022
Tech Support
TL Community
The Automated Ban List
Blogs
Play, Watch, Drink: Esports …
TrAiDoS
My 2025 Magic: The Gathering…
DARKING
Life Update and thoughts.
FuDDx
How do archons sleep?
8882
StarCraft improvement
iopq
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1380 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
Wardi Open
12:00
#73
WardiTV806
OGKoka 274
Rex119
IntoTheiNu 13
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
OGKoka 274
Rex 119
StarCraft: Brood War
Calm 7601
Bisu 2089
BeSt 1642
Hyuk 1354
Flash 1162
actioN 1026
Horang2 918
Zeus 802
Larva 528
EffOrt 346
[ Show more ]
Mini 317
firebathero 316
Snow 235
ZerO 222
ggaemo 218
Soma 210
Sharp 152
JYJ 145
PianO 140
Soulkey 129
hero 91
Pusan 78
Rush 77
Mind 60
Mong 56
Backho 51
sorry 35
Aegong 34
Yoon 32
Shuttle 29
GoRush 27
ToSsGirL 26
Free 25
soO 20
Shine 19
Shinee 18
910 18
Movie 16
Noble 14
HiyA 13
Bale 12
SilentControl 8
Icarus 6
Dota 2
qojqva225
XcaliburYe128
Dendi88
Counter-Strike
olofmeister2031
byalli768
x6flipin609
allub403
Super Smash Bros
Mew2King139
Other Games
singsing2010
B2W.Neo536
crisheroes301
Happy272
hiko221
Sick188
Pyrionflax173
Livibee62
ZerO(Twitch)19
ArmadaUGS18
mouzStarbuck1
Organizations
StarCraft: Brood War
UltimateBattle 1728
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 16 non-featured ]
StarCraft 2
• intothetv
• AfreecaTV YouTube
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• StrangeGG 48
• iopq 4
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• WagamamaTV214
League of Legends
• Nemesis10754
• Jankos2067
• TFBlade336
Upcoming Events
Monday Night Weeklies
3h 40m
Replay Cast
10h 40m
Sparkling Tuna Cup
20h 40m
LiuLi Cup
21h 40m
Reynor vs Creator
Maru vs Lambo
PiGosaur Monday
1d 11h
Replay Cast
1d 19h
LiuLi Cup
1d 21h
Clem vs Rogue
SHIN vs Cyan
The PondCast
2 days
KCM Race Survival
2 days
LiuLi Cup
2 days
Scarlett vs TriGGeR
ByuN vs herO
[ Show More ]
Replay Cast
3 days
Online Event
3 days
LiuLi Cup
3 days
Serral vs Zoun
Cure vs Classic
RSL Revival
4 days
RSL Revival
4 days
LiuLi Cup
4 days
uThermal 2v2 Circuit
4 days
RSL Revival
5 days
Replay Cast
5 days
Sparkling Tuna Cup
5 days
LiuLi Cup
5 days
Replay Cast
6 days
Replay Cast
6 days
LiuLi Cup
6 days
Wardi Open
6 days
Liquipedia Results

Completed

CSL 2025 WINTER (S19)
Rongyi Cup S3
Underdog Cup #3

Ongoing

KCM Race Survival 2026 Season 1
Nations Cup 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
eXTREMESLAND 2025
SL Budapest Major 2025
ESL Impact League Season 8

Upcoming

Escore Tournament S1: W8
Acropolis #4
IPSL Spring 2026
HSC XXIX
uThermal 2v2 2026 Main Event
Bellum Gens Elite Stara Zagora 2026
RSL Revival: Season 4
WardiTV Winter 2026
LiuLi Cup: 2025 Grand Finals
CCT Season 3 Global Finals
FISSURE Playground #3
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League Season 23
ESL Pro League Season 23
PGL Cluj-Napoca 2026
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 © 2026 TLnet. All Rights Reserved.