• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 16:12
CEST 22:12
KST 05:12
  • 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
[ASL21] Ro24 Preview Pt2: News Flash10[ASL21] Ro24 Preview Pt1: New Chaos0Team Liquid Map Contest #22 - Presented by Monster Energy19ByuL: The Forgotten Master of ZvT30Behind the Blue - Team Liquid History Book20
Community News
$5,000 WardiTV TLMC tournament - Presented by Monster Energy3GSL CK: More events planned pending crowdfunding6Weekly Cups (May 30-Apr 5): herO, Clem, SHIN win0[BSL22] RO32 Group Stage5Weekly Cups (March 23-29): herO takes triple6
StarCraft 2
General
Team Liquid Map Contest #22 - Presented by Monster Energy Quebec Clan still alive ? BGE Stara Zagora 2026 cancelled Blizzard Classic Cup @ BlizzCon 2026 - $100k prize pool Weekly Cups (May 30-Apr 5): herO, Clem, SHIN win
Tourneys
$5,000 WardiTV TLMC tournament - Presented by Monster Energy GSL CK: More events planned pending crowdfunding Sea Duckling Open (Global, Bronze-Diamond) Sparkling Tuna Cup - Weekly Open Tournament RSL Season 4 announced for March-April
Strategy
Custom Maps
[D]RTS in all its shapes and glory <3 [A] Nemrods 1/4 players [M] (2) Frigid Storage
External Content
The PondCast: SC2 News & Results Mutation # 520 Moving Fees Mutation # 519 Inner Power Mutation # 518 Radiation Zone
Brood War
General
ASL21 General Discussion [BSL22] RO32 Group Stage BW General Discussion so ive been playing broodwar for a week straight. Gypsy to Korea
Tourneys
Escore Tournament StarCraft Season 2 [Megathread] Daily Proleagues [ASL21] Ro24 Group F [BSL22] RO32 Group B - Sunday 21:00 CEST
Strategy
Fighting Spirit mining rates Muta micro map competition What's the deal with APM & what's its true value Simple Questions, Simple Answers
Other Games
General Games
Battle Aces/David Kim RTS Megathread Stormgate/Frost Giant Megathread General RTS Discussion Thread Starcraft Tabletop Miniature Game Nintendo Switch Thread
Dota 2
The Story of Wings Gaming Official 'what is Dota anymore' discussion
League of Legends
G2 just beat GenG in First stand
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 TL Mafia Community Thread Five o'clock TL Mafia
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread The China Politics Thread European Politico-economics QA Mega-thread Trading/Investing Thread
Fan Clubs
The IdrA Fan Club
Media & Entertainment
[Manga] One Piece [Req][Books] Good Fantasy/SciFi books Movie Discussion!
Sports
2024 - 2026 Football Thread Formula 1 Discussion Cricket [SPORT] Tokyo Olympics 2021 Thread
World Cup 2022
Tech Support
[G] How to Block Livestream Ads
TL Community
The Automated Ban List
Blogs
How Streamers Inspire Gamers…
TrAiDoS
Broowar part 2
qwaykee
Funny Nicknames
LUCKY_NOOB
Iranian anarchists: organize…
XenOsky
ASL S21 English Commentary…
namkraft
StarCraft improvement
iopq
Electronics
mantequilla
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2253 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
BSL
19:00
RO32 Group A
n0maD vs perroflaco
TerrOr vs ZZZero
MadiNho vs WolFix
DragOn vs LancerX
ZZZero.O200
LiquipediaDiscussion
PSISTORM Gaming Misc
15:55
FSL s10 code A/B Championships
Freeedom32
Liquipedia
uThermal 2v2 Circuit
15:00
Season 2 - Bonus Cup 7
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
BRAT_OK 105
Ketroc 79
PattyMac 44
CosmosSc2 35
StarCraft: Brood War
Britney 15065
Mini 497
Shuttle 398
ZZZero.O 200
Soulkey 80
ggaemo 66
Rock 40
910 29
NaDa 8
Dota 2
monkeys_forever506
ROOTCatZ22
Counter-Strike
pashabiceps2690
Heroes of the Storm
Liquid`Hasu304
Khaldor250
MindelVK17
Other Games
summit1g7449
Grubby3068
FrodaN2571
B2W.Neo625
crisheroes196
Dewaltoss75
Trikslyr62
Organizations
Other Games
gamesdonequick776
StarCraft 2
angryscii 7
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 19 non-featured ]
StarCraft 2
• printf 68
• Adnapsc2 9
• IndyKCrew
• sooper7s
• AfreecaTV YouTube
• Migwel
• intothetv
• LaughNgamezSOOP
• Kozan
StarCraft: Brood War
• 3DClanTV 23
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• WagamamaTV1523
League of Legends
• TFBlade1897
• Doublelift1617
Other Games
• imaqtpie1321
• Shiphtur213
• tFFMrPink 14
Upcoming Events
Sparkling Tuna Cup
13h 48m
WardiTV Team League
14h 48m
OSC
16h 48m
BSL
22h 48m
Sterling vs Azhi_Dahaki
Napoleon vs Mazur
Jimin vs Nesh
spx vs Strudel
IPSL
22h 48m
Artosis vs TBD
Napoleon vs TBD
Replay Cast
1d 12h
Wardi Open
1d 13h
Afreeca Starleague
1d 13h
Soma vs YSC
Sharp vs sSak
Monday Night Weeklies
1d 19h
Afreeca Starleague
2 days
Snow vs PianO
hero vs Rain
[ Show More ]
GSL
2 days
Replay Cast
3 days
Kung Fu Cup
3 days
The PondCast
4 days
Escore
5 days
Korean StarCraft League
6 days
CranKy Ducklings
6 days
IPSL
6 days
WolFix vs nOmaD
dxtr13 vs Razz
BSL
6 days
Liquipedia Results

Completed

Escore Tournament S2: W2
RSL Revival: Season 4
NationLESS Cup

Ongoing

BSL Season 22
ASL Season 21
CSL 2026 SPRING (S20)
IPSL Spring 2026
StarCraft2 Community Team League 2026 Spring
Nations Cup 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League S23 Finals
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026
IEM Kraków 2026

Upcoming

Escore Tournament S2: W3
Acropolis #4
BSL 22 Non-Korean Championship
CSLAN 4
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
RSL Revival: Season 5
WardiTV TLMC #16
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026
BLAST Rivals Spring 2026
CCT Season 3 Global Finals
IEM Rio 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.