• Log InLog In
  • Register
Liquid`
TeamLiquid Liquipedia LiquidDota LiquidLegends
EDT 19:25
CEST 01:25
KST 08:25
  • 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
Code A Season 2 - Day 3 Preview (2021)10TSL7 - Week 2 - Order or Chaos?11Code A Season 2 - Day 2 Preview (2021)5Pole Position: 4 Top Contenders at TSL 712Code A Season 2 - Day 1 Preview2
Community News
GSL Season 2 - Code A concludes, Code S groups determined2Charity - Cheese Out Cancer10The Biggest Loser - Loser Takes None* Tournament42PSL Brood War Invitational #112Code A - RagnaroK upsets Cure, sOs & Dark advance14
StarCraft 2
General
GSL Season 2 - Code A concludes, Code S groups determined Who will win TeamLiquid Starleague 7? Greatest SC2 Protoss player of all-time? Team Liquid Map Contest #15 [TSL 7] Shopify's True or False with TLO, Week 2
Tourneys
The Biggest Loser - Loser Takes None* Tournament [EPT 2021-22] ESL Open Cups NeXT 2021 Season 1 SC2 Masters 2021 NA Apprentice Season 3 [Alpha Pro Series] Astrea vs KeeN
Strategy
Terran LotV builds EASY Beginner Zerg Build Order Guide [2021] Simple Questions Simple Answers [G] SC2Reminder - A reminding helper
Custom Maps
[M] (4) Nautilus SC2 Desert strike [M] (4) Spark [F](2)Pride of Altaris
External Content
Mutation # 270 Cremation The StarCraft Observer Podcast Episode #6 Mutation # 269 The Ultimate Price Mutation # 268 Rumble in the Jungle
Brood War
General
State of BW in Korea, sponsoring, crowdfunding etc BW General Discussion Khala v Scan | Dreamer v TTF: Friday June 25 Goons vs M&M micro map Did you see BSL 12 Finals? They were amazing.
Tourneys
STARCRAFT WORST MAP FREE FOR ALL CHAMPIONSHIP BWCL Season 53 starts the 2nd of May! [CNSL S4]CasterMuse Narak StarLeague Season 4 Deathfate Duel Series 7: TerrOr vs Gosudark
Strategy
Why does flash play terran. [Micro Map] Valkyrie vs. Carrier Arena 1.0 Valkyrie dmg formula? Simple Questions, Simple Answers
Other Games
Heroes of the Storm
[HotS] Unofficial World Championship (Part 1) HotS: WP and Funny Moments [HotS] Korean Final Boss: FiSH Bowl Heroes League Patch 54.0: Globes, Loans and Tons of Reworks New Feature: Loan Talents
General Games
Cyberpunk 2077 EVE Corporation Genshin Impact - Coop RPG The PlayStation 5 The XBox Thread
TL Mafia
TL Mafia Community Thread British Empire Mini Mafia
Hearthstone
Is Hearthstone Gambling?
LoL General
LoL Tournaments
LoL Strategy
Community
General
US Politics Mega-thread Mexico's Drug War European Politico-economics QA Mega-thread Coronavirus and You The Big Programming Thread
Fan Clubs
The Scarlett Fan Club NaNiwa Fan Club! GuMiho Fan Club
Media & Entertainment
Korean Music Discussion Anime Discussion Thread [Manga] One Piece Dragon Ball Super Discussion [TV] HBO Game of Thrones
Sports
2020 - 2021 Football Thread NBA General Discussion Formula1 2019 NHL 21: Tony DeActivito Did Nazi That Coming UFC/MMA Discussion Thread
Tech Support
Computer Build, Upgrade & Buying Resource Thread The Ultimate Mouse Thread How do I list my stream on tl.net?
TL Community
The Automated Ban List Ask TL Staff Anything
Blogs
Heading North - A Pacific Cres…
Tak3r
Some thoughts about …
waywardstrategy
2021: Who to watch in CSGO…
Ragnarork
MH2 Prerelease Recap…
TheRealNanMan
Dragoon Sweet Tart
BigFan
The StarCraft O…
TheStarCraftObserver
Post Malone Remix
WindOw
A decade of Starcraft 2: 201…
Nakajin
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1396 users

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

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: 2011-01-12 03:08:12
July 12 2010 07:27 GMT
#21
First post here, and I would create a new thread so as not to hijack yours, but it won't let me for 3 days. I just wanted to offer an alternate solution I came up with for myself which others might find useful. This is a DOS Batch/VBScript solution that uses Windows Task Scheduler so no downloads or software installs are needed.

What this does is either copies or moves (your choice) any .SC2Replay files from the source folder to the destination folder, and renames it to remove any parentheses/number component after the map name and replaces that with a date-time string to make it unique.

UPDATE 1-11-2011: I updated the example "source" path in the script to reflect the change in patch 1.2.0 where unsaved multiplayer replays are now stored in the Unsaved\Multiplayer folder instead of just the Unsaved folder. See this post for details.

UPDATE 8-1-2010: I've added step-by-step instructions for setting up a scheduled task for either Windows 7/Vista or Windows XP.

UPDATE 7-31-2010: I have updated my date parser to work with most international locales. It reads date/time format information from the registry and has some exceptions (e.g. Arabic locales) for when the registry is not used. Very complex -- impossible to work with 100% of the weird locales out there, but it should work for the vast majority.

First copy the following line into Notepad and save it as something like "invisible.vbs" in any folder, just remember where you put it for later:

CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False


This is a VBScript file that you call with Windows Scripting Host (wscript.exe). It allows you to run the batch file invisibly (normally a command prompt window would pop up briefly).

Next is the Windows Batch file that does all the actual work. Copy and paste this into Notepad and save it as a .bat file:
@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\Multiplayer
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
set destTime=!yy!!mm!!dd!-!hh!!mn!

set output=%destination%\!baseName! !destTime!.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


Old version of the script is below for posterity:
+ 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! I doubt this will work properly on anything but standard US
:: English locales because the date parser I wrote specifically for
:: the standard US English date format.
::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

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

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=( 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 Standard US English Date/Time parser, tweak if you
REM use a non-standard date/time format or locale.
REM Converts from "Sun 7/11/2010 01:50 PM" to "20100711-1350"
for /f "tokens=1-6 delims=/: " %%c in ("%%~ta") do (
set hour=%%f
set AMPM=%%h
if "!AMPM!"=="AM" (
if "!hour!"=="12" set hour=00
) else (
if "!AMPM!"=="PM" (
if "!hour:~0,1!"=="0" set hour=!hour:~1,1!
if not "!hour!"=="12" set /A hour=!hour!+12
)
)
set modTime=%%e%%c%%d-!hour!%%g
set output=%destination%\!baseName! !modTime!.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


Modify the lines for "source", "destination" and if need be, "action" as it applies to your system and whether you want to MOVE or COPY the replay files.

Next you'll want to schedule a task to run the script every 5 minutes or so. There are two separate guides below, one for Windows 7/Vista and one for XP. Expand the appropriate spoiler and continue with the steps.

Task Scheduler Setup (Windows 7/Vista):
+ Show Spoiler +

  1. Click the Start button on the taskbar.
  2. Type "Task Scheduler" in the Search box and click the first result that says Task Scheduler.
  3. Expand the Task Scheduler Library folder in the list pane on the left.
  4. Right click the Task Scheduler Library folder and choose "New Folder". Give it a name like My Custom Tasks.
  5. Right click your new folder and choose "Create Task" (not "Create Basic Task", we want a little more flexibility than what the basic wizard offers).
  6. Enter a name like "SC2 Replay Backup" for the Name and a description if you want.
  7. Click the Triggers tab.
  8. Click New.
  9. For "Begin the task", choose "At log on".
  10. Select Specific user and it will only run when you are logged in.
  11. Under Advanced Settings, check Repeat task every and choose "5 minutes" for the first box and a duration of "Indefinitely" for the second box.
  12. Click OK.
  13. Click the Actions tab.
  14. Click New.
  15. Type wscript.exe in the Program/script box.
  16. In the Arguments box type the following, substituting your own paths to the script files you created earlier:
    "C:\path to\invisible.vbs" "C:\path to\sc2replays.bat"
    Include the quotes around each argument.
  17. Click OK twice
  18. Log out of your machine (or restart) and log back in.

The task should now be active and will run every 5 minutes as long as you are logged in. You can always disable the task from the Task Scheduler. You might want to add another trigger where "Begin the task" is set to "At task creation/modification". This will cause the task to begin again whenever you modify it, otherwise you will have to log off and back in to re-enable it after disabling it. (You can't just right click and run the task, because doing it that way only runs it once, not every 5 minutes.)


Scheduled Tasks Setup (Windows XP):
+ Show Spoiler +

  1. Click the Start button on the task bar.
  2. Click Run...
  3. Type "control schedtasks" (minus quotes) in the box and click OK. This is a shortcut to the Scheduled Tasks applet.
  4. Go to File-New-Scheduled Task. This bypasses the useless "Add Scheduled Task" wizard.
  5. Give the new task a name like SC2 Replay Backup
  6. Right click the new task and choose Properties
  7. In the Run box enter the following, substituting your own paths to the script files you created earlier:
    wscript.exe "C:\path to\invisible.vbs" "C:\path to\sc2replays.bat"
    Include the quotes around each argument.
  8. Check the "Run only if logged on" box.
  9. Click the Schedule tab
  10. Leave the Schedule Task box as "Daily". Adjust the Start time to a few minutes from now, or whenever you want the script to start the very first time. We'll set it up to run continuously so this doesn't matter too much.
  11. Click the Advanced button.
  12. Check the Repeat task box.
  13. Change the interval to every 5 minutes, or as often as you like.
  14. Change the duration box to 24 hours.
  15. Click OK.
  16. Click the Settings tab.
  17. Uncheck "Stop the task if it runs for..."
  18. Click OK.

The task should now be scheduled to run the very first time at the time you specified and after that will run every 5 minutes as long as you are logged in. You can always disable the task from Start-Control Panel-Scheduled Tasks.

Observations:
I have found that if you are using "move" mode, and you are viewing a replay it hasn't moved yet, it will gracefully fail to move the file and will succeed the next time it runs after you are no longer viewing it.

One issue I found is that if the script moves a replay from the Unsaved folder in-game while you are browsing it, the interface might glitch out a little. Just run a different replay or restart the game.

Feel free to PM me if you have any issues.
YellowTwo
Profile Joined June 2010
3 Posts
July 12 2010 07:42 GMT
#22
I've spent a lot of time trying to find a way to link other folders to my dropbox folder and this is great! AND it's a solution for saving all my replays? I <3 u
lac29
Profile Blog Joined December 2008
United States1430 Posts
July 12 2010 07:46 GMT
#23
Nice post ... thanks!
Blahman
Profile Joined July 2010
United States40 Posts
July 12 2010 08:06 GMT
#24
made a small edit to the date parser, I forgot that midnight (12 AM) = 00 in 24-hour time
grab it again if you already got it.
Blahman
Profile Joined July 2010
United States40 Posts
July 12 2010 08:25 GMT
#25
On July 12 2010 15:51 Artifice wrote:
As far as I can tell it isn't actually deleting your old replays, just removing them from the in-game list. For example, I have 25 replays in Documents/StarCraft II Beta/Accounts/818252/1-S2-1-65565/Replays/Unsaved/, but only 10 show up on the Recent Replays list in-game.


It deletes after 25.

On July 12 2010 12:30 StaR_Robo wrote:
if you don't rename the files and shift them from the Unsaved directory they will just end up getting overwritten. The default format for naming an unsaved game is just the map name .. e.g Blistering Sands.SC2Replay. If you play another game on the same map it gets named as Blistering Sands (2).SC2Replay and so on. So you need to add in some renaming like add the datestamp of the game or something into the process or you will just be copying over the top of existing files all the time. If you want to be able to watch the replays you also want them in the Multiplayer folder under replays so I woudl suggest the process should be:
1. Copy with rename from Replays\Unsaved to Replays\Multiplayer
2. Copy from Replays\Multiplayer to dropbox if you want to store offline

Step 2 seems to be an optional step to me if you are just interested in making sure your replays aren't overwritten.


I came to the same conclusion -- files get overwritten if you just do a dumb copy -- my script actually renames files based on their timestamp so nothing will ever be lost or overwritten.
Lighioana
Profile Joined March 2010
Norway466 Posts
Last Edited: 2010-07-12 08:26:56
July 12 2010 08:26 GMT
#26
This can be done without dropbox just by using Windows Task Scheduler. Good solution though.
And forgive me nothing for I truly meant it all
tdhz77
Profile Blog Joined July 2010
United States16 Posts
July 12 2010 08:48 GMT
#27
blahman, please check your inbox.
Since 01'
GreatestThreat
Profile Joined May 2010
United States631 Posts
Last Edited: 2010-07-12 11:02:07
July 12 2010 11:01 GMT
#28
I'm still not understanding why people are going through all this trouble. It seems ridiculously complicated to go through either:

Solution 1:

Show nested quote +
On July 12 2010 11:37 tdhz77 wrote:
Replays are a pretty cool to have (if) you have them. The problem with the latest beta patch, is that it only saves your last 10 recent games and to many times I've forgot to actually save the replay file. Most replay files are about 100kb depending on how long the game is, I've yet to see a replay file exceed 400 kb's. So, I'm uncertain as to why Blizzard feels the need to limit us and force us to save our own games. For whatever reason, I'm posting this solution that I use and I hope somebody out there might find this to be useful.

There are now TWO ways of backing up up your SC2 Replays.

(RECOMMENDED) Bahman's Solution using a VBS script:
Go here for more details:
http://www.teamliquid.net/forum/viewpost.php?post_id=5701696




==================================================================

And the older version: *NOTE: This version does not add a timestamp like Bahman's solution, thus you will have LostTemple(1).(2).(3).(4)..etc and it doesn't give you enough information making it a major pain with large collection. Bahman's solution saves your replay with a time stamp LostTemple-July-13-2010.sc2map and is awesome! Please Try it out!

The second solution, will backup your Unsaved replays into your Multiplayer folder, then back it up online through drop box. Some users, have found this to be an unnecessary solution, but if you want your replays backed up on another computer you could try out DropBox.

Dropbox, which will automatically backup your replay files online to a server cloud, making it easy for you if you ever get a new computer, reinstall, or delete your replays you will have them on dropbox.com forever!

The second application is Karen's Replicator: This will automatically copy all of your recent/saved multiplayer games to your dropbox folder, which will automatically be uploaded to a cloud, so you can download the replays later.


1) Install dropbox (http://www.dropbox.com/)
1a) Sign-up for a Free Account (2GB) will be plenty of space for replays.
1b) Install your dropbox into the default location ** THIS IS IMPORTANT

2) Download and install Karen's Replicator

2a) http://www.karenware.com/powertools/ptreplicator.asp
2b) Install and Run Karen's Replicator

[image loading]

2c) Create a "New Job"

[image loading]
- Job Name: Starcraft (Anything you'd like)
- Source Folder "Browse" [to your SC replay folder] C:\Users\USERNAME\Documents\StarCraft II Beta\Accounts\7373337\1-S2-1-22116\Replays\Unsaved
- Destination "Browse"
- C:\Users\USERNAME\Documents\StarCraft II Beta\Accounts\7373337\1-S2-1-22116\Replays\Multiplayer

- Click "Change Schedule" and select every 20 minutes. Leave the day at 0. (This will copy the replays to your dropbox every 20 minutes, you can adjust this to your liking.
- Click Save Job.

[image loading]
[image loading]
2c) Create a "New Job"
- Job Name: Starcraft (Anything you'd like)
- Source Folder "Browse" [to your SC replay folder] C:\Users\USERNAME\Documents\StarCraft II Beta\Accounts\7373337\1-S2-1-22116\Replays\Multiplayer
- Destination "Browse"
- You have two options. Public or Private
- If you you would like the world to see your replay files, Browse to your DropBox->Public folder and click OK. Your replays will now be synced and available to download from the world.
- If you would like your replays to be kept private. Browse to any folder that is not the PUBLIC folder and you can give access to anybody you want to see your replays.

- For Me, I used the Public option, so I used: C:\Users\USERNAME\My Dropbox\Public

- Click "Change Schedule" and select every 20 minutes. Leave the day at 0. (This will copy the replays to your dropbox every 20 minutes, you can adjust this to your liking.

[image loading]
- Click Save Job.
- Click Run All Enabled Jobs Now, and you will be all set.


Make sure that Karen's Replicator is minimized and not closed.

I hope this helps at least one of you, because If your like me, you never save your replays.

EDIT: This solution will also work if your on a friends computer. You can simply login to dropbox from the desktop and it will sync to your dropbox and not your friends.

EDIT: Updated with the excellent suggestion from StaR_Robo.

1. Copy with rename from Replays\Unsaved to Replays\Multiplayer
2. Copy from Replays\Multiplayer to dropbox if you want to store offline


EDIT: Added pictures, anybody who thinks this method is "to complicated" should give it a shot. You will not find a easier solution as of writing.

You can check out my dropbox here:

https://www.dropbox.com/3104902/4951754/24b8080/events.xml

If you like this system: Please add me on SC2 @ TheGreat.865 - I need friends.






Or, Solution 2:

On July 12 2010 16:27 Blahman wrote:
First post here, and I would create a new thread so as not to hijack yours, but it won't let me for 3 days. I just wanted to offer an alternate solution I came up with for myself which others might find useful. This is a DOS Batch/VBScript solution that uses Windows Task Scheduler so no downloads or software installs are needed.

What this does is either copies or moves (your choice) any .SC2Replay files from the source folder to the destination folder, and renames it to remove any parentheses/number component after the map name and replaces that with a date-time string to make it unique.

Note that my date parser code will only work if you are using the standard US English date setting and locale. I might try writing a more robust version later.

First copy the following line into Notepad and save it as something like "invisible.vbs" in any folder, just remember where you put it for later:

Show nested quote +
CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False


This is a VBScript file that you call with Windows Scripting Host (wscript.exe). It allows you to run the batch file invisibly (normally a command prompt window would pop up briefly).

Next is the Windows Batch file that does all the actual work. Copy and paste this into Notepad and save it as a .bat file:

Show nested quote +

@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! I doubt this will work properly on anything but standard US
:: English locales because the date parser I wrote specifically for
:: the standard US English date format.
::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

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

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=( 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 Standard US English Date/Time parser, tweak if you
REM use a non-standard date/time format or locale.
REM Converts from "Sun 7/11/2010 01:50 PM" to "20100711-1350"
for /f "tokens=1-6 delims=/: " %%c in ("%%~ta") do (
set hour=%%f
set AMPM=%%h
if "!AMPM!"=="AM" (
if "!hour!"=="12" set hour=00
) else (
if "!AMPM!"=="PM" (
if "!hour:~0,1!"=="0" set hour=!hour:~1,1!
if not "!hour!"=="12" set /A hour=!hour!+12
)
)
set modTime=%%e%%c%%d-!hour!%%g
set output=%destination%\!baseName! !modTime!.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


Modify the lines for "source", "destination" and if need be, "action" as it applies to your system and whether you want to MOVE or COPY the replay files.

Next open up Windows Task Scheduler (Scheduled Tasks in Windows XP).

Create a new task. There are at least a few different ways to set this up and it depends on your OS so research that on your own if you need to. Here's what I used, running Windows 7:

Trigger 1: At log on. Specific user (me). Repeat task every 5 minutes for duration of Indefinitely.
Trigger 2: At task creation/modification. Repeat task every 5 minutes for duration of Indefinitely.
Actions: Start a program:
- Program/script: wscript.exe
- Arguments: "C:\Users\USER\Documents\runInvisible.vbs" "C:\Users\USER\Documents\sc2replaybackup.bat"

Whew, that's it! If everything works the script should run immediately after modification and every 5 minutes thereafter, as well as upon login and every 5 minutes thereafter.

I have found that if you are using "move" mode, and you are viewing a replay it hasn't moved yet, it will gracefully fail to move the file and will succeed the next time it runs after you are no longer viewing it.

One issue I found is that if the script moves a replay from the Unsaved folder in-game while you are browsing it, the interface might glitch out a little. Just run a different replay or restart the game.

Feel free to PM me if you have any issues.




When I can just use Solution 3:

Save my replays. With the save button. That does all this for me. It also lets me name each replay for easier finding later.




If there's something I'm missing, somebody please let me know.
"I'm ethereal! My children are legion, serial! They stick to my skin like beloved cysts... I TEAR AWAY WITH MY NAILS AND TEETH AND FISTS!"
StaR_Robo
Profile Joined May 2010
Australia229 Posts
July 12 2010 11:20 GMT
#29
Yeah I have to admit I prefer the option of saving them myself so I don't get flooded with lots of useless replays. Play a good game ... think to yourself 'wow that was a gg' .. save it with a name that helps you find it again later .. queue for next game.

It is a very difficult process though I guess
Working to spread StarCraft II through http://rts-sanctuary.com - replays, stats, streams and more ...
Numy
Profile Blog Joined June 2010
South Africa14148 Posts
July 12 2010 11:23 GMT
#30
On July 12 2010 20:01 GreatestThreat wrote:


When I can just use Solution 3:

Save my replays. With the save button. That does all this for me. It also lets me name each replay for easier finding later.




If there's something I'm missing, somebody please let me know.


Because after playing 50+ games a day I highly doubt you will remember to save each replay and the effort to do so will far outweigh any of these methods
StaR_Robo
Profile Joined May 2010
Australia229 Posts
July 12 2010 11:39 GMT
#31
and when you have 5000 replays in your folder the chance of finding the one you actually wanted to watch again will be? I guess there are always going to be 2 camps .. those that want to save every game no matter what and those that only save those they think are memorable.

Classic case of "to each his own"
Working to spread StarCraft II through http://rts-sanctuary.com - replays, stats, streams and more ...
Blahman
Profile Joined July 2010
United States40 Posts
Last Edited: 2010-07-12 17:48:18
July 12 2010 17:36 GMT
#32
Well I am definitely a packrat, so I had no qualms about coming up with what really is not that complex a solution to what is to me a very annoying problem. I don't blame you for sticking with the manual method though. Sometimes that initial effort is just too much.
aka_star
Profile Blog Joined July 2007
United Kingdom1543 Posts
July 13 2010 09:42 GMT
#33
awesome!
FlashDave.999 aka Star
FEiN
Profile Joined July 2010
United Kingdom87 Posts
July 13 2010 18:29 GMT
#34
If you use a *nix based OS with inotify support you can use that, which is much better than cron as it will get the file as its created.
Blahman
Profile Joined July 2010
United States40 Posts
July 13 2010 18:54 GMT
#35
On July 14 2010 03:29 FEiN wrote:
If you use a *nix based OS with inotify support you can use that, which is much better than cron as it will get the file as its created.


Mind posting or linking to a how to for our neglected Mac OS friends?
Blahman
Profile Joined July 2010
United States40 Posts
July 14 2010 01:03 GMT
#36
FYI:
On July 14 2010 09:39 Ipp wrote:
To get Version 19 Replays working:

Move the C:\Program Files\Starcraft II Beta\versions\base16036 folder anywhere outside the Starcraft folder(such as your desktop) and then drag the replay file to the SC2Switcher icon. To play again, just move it back.

DeCoup
Profile Joined September 2006
Australia1933 Posts
July 14 2010 01:21 GMT
#37
On July 12 2010 20:39 StaR_Robo wrote:
and when you have 5000 replays in your folder the chance of finding the one you actually wanted to watch again will be? I guess there are always going to be 2 camps .. those that want to save every game no matter what and those that only save those they think are memorable.

Classic case of "to each his own"

I have around 900 replays from phase 1. The way I find specific replays is using sc2gears. You can search replays based on all sorts of information. The map name, the players, the matchup, specific buildings, units or abilities being used, etc. It gets very easy to narrow down the list and find what your after very fast.
"Poor guy. I really did not deserve that win. So this is what it's like to play Protoss..." - IdrA
Blahman
Profile Joined July 2010
United States40 Posts
July 16 2010 00:22 GMT
#38
On July 14 2010 10:21 DeCoup wrote:
Show nested quote +
On July 12 2010 20:39 StaR_Robo wrote:
and when you have 5000 replays in your folder the chance of finding the one you actually wanted to watch again will be? I guess there are always going to be 2 camps .. those that want to save every game no matter what and those that only save those they think are memorable.

Classic case of "to each his own"

I have around 900 replays from phase 1. The way I find specific replays is using sc2gears. You can search replays based on all sorts of information. The map name, the players, the matchup, specific buildings, units or abilities being used, etc. It gets very easy to narrow down the list and find what your after very fast.


intriguing -- does it work on the latest version?
StaR_Robo
Profile Joined May 2010
Australia229 Posts
July 16 2010 00:52 GMT
#39
no sc2gears is still broken for phase 2 atm .. the author is working on the upgrade but there were a lot of changes in action recording etc so it's not just a matter of making a few changes. I suspect that when he gets it upgraded it won't work with old replays but you can always keep an old version of the program (1.3 is the last before phase 2) and make sure it doesn't autoupdate
Working to spread StarCraft II through http://rts-sanctuary.com - replays, stats, streams and more ...
Ownos
Profile Joined July 2010
United States2146 Posts
July 30 2010 21:24 GMT
#40
For anyone having trouble using WinXP the run line on your task should look like this:
D:\WINDOWS\system32\wscript.exe "D:\invisible.vbs" "D:\replays.bat"

Had a bit of trouble thinking I had to run replays.bat as the program haha.

I also changed the time stamp to be more readable:
set modTime=%%e-%%c-%%d-!hour!%%g

Should output 2010-7-30-1200 instead of one big number.

Also does anyone know if the release version still autodeletes? I'm assuming it still does so I set it up just now for release.

On July 12 2010 20:39 StaR_Robo wrote:
and when you have 5000 replays in your folder the chance of finding the one you actually wanted to watch again will be? I guess there are always going to be 2 camps .. those that want to save every game no matter what and those that only save those they think are memorable.

Classic case of "to each his own"


Really isn't the point. Some of us are just pack rats. We might think "Oh hey I had a replay doing X and Y and it didn't work" but we may not have thought much of it to save it. Or just want to see how much we sucked back then. Replays don't take up much space anyway and the script and bat file were pretty trivial to put in place as opposed to manually saving each time which would add up over time so my 3 min effort once better than your 5 secs x 100 if you in the long run only save 100 "favorite" replays. If we have a favorite replay we can stick it in another folder and give it a more meaningful name. Just like we did before Blizzard fucked up the replay saving system.

This stupid system causes more problems then it solves (solving replays from taking up insignificant hard drive space!) Most people who are unawares will check to find their old replays and oops it's gone. Or forget to save them etc.
...deeper and deeper into the bowels of El Diablo
Prev 1 2 3 4 5 Next All
Please log in or register to reply.
Live Events Refresh
ESL Pro Tour
23:00
Americas Open Cup #76
SteadfastSC150
Golden45
BadBorz14
GgfOu2
[Ris3n]Renegade1
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
PartinGtheBigBoy 739
JimRising 630
IndyStarCraft 255
Forgg! 207
UpATree 180
Rex 75
JuggernautJason71
NonY 60
ProTech50
Golden 45
EnDerr 4
StarCraft: Brood War
Terrorterran 109
Shinee 75
Sexy 28
Heroes of the Storm
Grubby2539
Counter-Strike: Global Offensive
XANTAREScN6527
tarik_tv1937
Super Smash Bros
hungrybox13635
Other Games
ToD420
gobbtv171
Trikslyr130
hades_tv8
Organizations
Other Games
gamesdonequick1624
ESL1285
Counter-Strike: Global Offensive
ESL CS:GO1126
StarCraft 2
ESL.tv389
OGamingTV SC2 184
Blizzard YouTube
[ Show 18 non-featured ]
StarCraft 2
• rockletztv 73
• Hupsaiya 31
• CammyGreen 1
• AlphaB_SC2
• Migwel
• Laughngamez YouTube
• LaughNgamez Trovo
• IndyKCrew
• Alpha X_
• Kozan
• Gussbus
• intothetv
• aXEnki
• AweesomeSauce
SC2: Legacy of the Void
• KarlJayG
• PSISTORM Gaming
StarCraft: Brood War
• sscaitournament2
• AfreecaTV YouTube
Upcoming Events
StarCraft BJ Destructio…
10h 35m
WardiTV Summer Champion…
14h 35m
MaxPax vs MaNa
uThermal vs Bly
BWCL
18h 35m
Red vs [eF]
StarCraft BJ Destructio…
1d 10h
Queen's Gambit
1d 17h
Showmatch
1d 17h
Reynor vs Clem
Elazer vs MaxPax
HeRoMaRinE vs Lambo
uThermal vs ShoWTimE
Astrea vs Neeb
Alpha Pro Series
2 days
Astrea vs KeeN
Challenge Wars
2 days
HeRoMaRinE vs Clem
MaxPax vs Lambo
ShoWTimE vs Neeb
Elazer vs souL
PSISTORM Gaming Misc
3 days
StarCraft BJ Destructio…
3 days
[ Show More ]
ArchonX
3 days
Solar vs ByuN & TY
Challenge Wars
3 days
Theleo-ua Showmatch Ser…
3 days
by.maru vs Scan
Dreamer vs TTF
ASL11 Revenge Battle
4 days
hero vs Snow
StarCraft BJ Destructio…
4 days
Russian Cyber Games
4 days
Shopify TSL 7
4 days
New Worlds Map Contest:…
4 days
Tech vs vOddy
Sziky vs UltrA
Hawk vs OyAji
Dandy vs Dewalt
ESL Pro Tour
5 days
Russian Cyber Games
5 days
Shopify TSL 7
5 days
ESL Pro Tour
6 days
ESL Pro Tour
6 days
Liquipedia Results

Completed

BW Jeez Weekly 114
DHM Summer: NA
Nexus Forces Tour.
BLAST Premier Spring Finals

Ongoing

CPL Season 7
Costa Rica SL 4
KCM Ladies Race Survival 2021 Season 2
KCM Race Survival 2021 Season 2
BWCL Season 53
Turf Wars Season 2
LPG Bolivia Season 1
MIT Chobo 2.0
MIT Gosu 2.0
TASL Season 2
CasterMuse Narak StarLeague Season 4
ESL ANZ Champs 2021 - Season 1
WTL 2021 Summer
TSL 7
NeXT 2021 S1
Community Clash League S2
Masters Clash Champ. 2021
Elisa Invitational Summer 2021
Spring Sweet Spring #3
ESEA S37 - NA Premier
ESEA S37 - EU Premier
ESEA S37 - AU Premier

Upcoming

BW Jeez Weekly 115
Deathfate Pro League 2
Alpha Omega Series: Dandy vs yabsab & Dewalt vs Ample
DDS 8: cRuZa vs Goku vs Conan vs Jhon
theleo_ua showmatch 7
RCG 2021
PSL Brood War Invitational #1
DH Masters Summer: Finals
2021 GSL S2: Code S
DreamHack Beyond
DreamHack Beyond Qual. 4
BLAST Premier Fall Groups
ESL Pro League Season 14
CBCS Elite League S2
IEM Cologne 2021
DH Open June 2021
Pinnacle Cup #2
StarLadder CIS RMR 2021
Gamers Without Borders 2021
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 © 2021 TLnet. All Rights Reserved.