• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 19:53
CEST 01:53
KST 08:53
  • 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
TL.net Map Contest #21: Voting7[ASL20] Ro4 Preview: Descent11Team TLMC #5: Winners Announced!3[ASL20] Ro8 Preview Pt2: Holding On9Maestros of the Game: Live Finals Preview (RO4)5
Community News
Weekly Cups (Oct 6-12): Four star herO65.0.15 Patch Balance Hotfix (2025-10-8)79Weekly Cups (Sept 29-Oct 5): MaxPax triples up3PartinG joins SteamerZone, returns to SC2 competition325.0.15 Balance Patch Notes (Live version)119
StarCraft 2
General
Revisiting the game after10 years and wow it's bad 5.0.15 Patch Balance Hotfix (2025-10-8) TL.net Map Contest #21: Voting How to Block Australia, Brazil, Singapore Servers The New Patch Killed Mech!
Tourneys
SC4ALL $6,000 Open LAN in Philadelphia Crank Gathers Season 2: SC II Pro Teams LiuLi Cup - September 2025 Tournaments Sparkling Tuna Cup - Weekly Open Tournament Master Swan Open (Global Bronze-Master 2)
Strategy
Custom Maps
External Content
Mutation # 495 Rest In Peace Mutation # 494 Unstable Environment Mutation # 493 Quick Killers Mutation # 492 Get Out More
Brood War
General
BW General Discussion [Interview] Grrrr... 2024 Question regarding recent ASL Bisu vs Larva game BW caster Sayle Map with fog of war removed for one player?
Tourneys
[ASL20] Semifinal B [ASL20] Semifinal A SC4ALL $1,500 Open Bracket LAN [Megathread] Daily Proleagues
Strategy
Relatively freeroll strategies Current Meta BW - ajfirecracker Strategy & Training Siegecraft - a new perspective
Other Games
General Games
Stormgate/Frost Giant Megathread Dawn of War IV Nintendo Switch Thread ZeroSpace Megathread Path of Exile
Dota 2
Official 'what is Dota anymore' discussion LiquidDota to reintegrate into TL.net
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
SPIRED by.ASL Mafia {211640} TL Mafia Community Thread
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine Men's Fashion Thread Sex and weight loss
Fan Clubs
The herO Fan Club! The Happy Fan Club!
Media & Entertainment
[Manga] One Piece Series you have seen recently... Anime Discussion Thread Movie Discussion!
Sports
2024 - 2026 Football Thread Formula 1 Discussion MLB/Baseball 2023 NBA General Discussion TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List Recent Gifted Posts
Blogs
Inbreeding: Why Do We Do It…
Peanutsc
From Tilt to Ragequit:The Ps…
TrAiDoS
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1154 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
Next event in 11h 7m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
PiGStarcraft316
SpeCial 223
ROOTCatZ 30
StarCraft: Brood War
Britney 5720
Calm 2253
Artosis 579
EffOrt 361
Dota 2
PGG 604
monkeys_forever337
Counter-Strike
fl0m594
Stewie2K319
Super Smash Bros
hungrybox173
Other Games
summit1g8039
Grubby2573
shahzam1008
Day[9].tv414
C9.Mang0220
ViBE168
Maynarde102
fpsfer 3
Organizations
Other Games
gamesdonequick719
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 16 non-featured ]
StarCraft 2
• Hupsaiya 47
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• WagamamaTV441
League of Legends
• Doublelift5001
Other Games
• imaqtpie1531
• Scarra584
• Day9tv414
Upcoming Events
Wardi Open
11h 7m
CranKy Ducklings
1d 10h
Safe House 2
1d 17h
Sparkling Tuna Cup
2 days
Safe House 2
2 days
Tenacious Turtle Tussle
5 days
The PondCast
6 days
Liquipedia Results

Completed

Acropolis #4 - TS2
WardiTV TLMC #15
HCC Europe

Ongoing

BSL 21 Points
ASL Season 20
CSL 2025 AUTUMN (S18)
C-Race Season 1
IPSL Winter 2025-26
EC S1
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
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

Upcoming

SC4ALL: Brood War
BSL Season 21
BSL 21 Team A
RSL Offline Finals
RSL Revival: Season 3
Stellar Fest
SC4ALL: StarCraft II
CranK Gathers Season 2: SC II Pro Teams
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
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.