|
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]](https://dl.dropbox.com/u/3104902/1.jpg)
2c) Create a "New Job"
![[image loading]](https://dl.dropbox.com/u/3104902/2.jpg) - 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]](https://dl.dropbox.com/u/3104902/3.jpg) ![[image loading]](https://dl.dropbox.com/u/3104902/4.jpg) 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]](https://dl.dropbox.com/u/3104902/5.jpg) - 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.
|
Whoa, nice first post man. Think I'll try this
|
Pretty good temporary solution, I figure Blizzard will have an "auto save" option in the future though^^
|
You could also, you know, just save them each time you finish a game that you thought was worth keeping around. There's a save replay button right in the score screen.
Excellent first post though, I'm sure somebody will find a use for it!
|
This is a really gud idea, thanks. what a 1st post haha
|
Weren't you prepared for this post? 
Many thanks!
|
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.
|
OMG, OH MY GOD, OH MY F*CKING GOD
Greatest post for the whole month!!!!!!!!!
|
This is a great idea! I used Drop Box before but never thought to use it for this
|
great post thanks! i usually just copy/paste the replays to a diff. directory once in awhile.
|
Wow epic first post. Good start and Welcome to TL man
|
too much work for lazy gamers !
|
This seems overly complicated. I prefer my method of just saving after every couple of games.
|
Too much technical stuff, too complicated and too much work lol. I rather just save my replays manually but good fine.
|
Aotearoa39261 Posts
Very nice I'm sure a more simple solution will present itself eventually but this is a nice temporary workaround
|
If you're on OS X, a simple cron job + dropbox will achieve the same effect. I've been using a cron job to back them up myself, but the idea of using dropbox for non-local storage is great. Kudos!
|
The dropbox part seems a bit overboard. People just don't want their replays to be auto-deleted. But nice anyway.
|
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/######/#-S#-#-#####/Replays/Unsaved/, but only 10 show up on the Recent Replays list in-game.
|
This method, will copy your Recent files into your Multiplayer, so you can view ALL of your replays as well as backup it up to a server to have forever. (If you want)
|
ive been exposed to karen's tools for many many years now, feels like almost 10 already, a lot of good stuff
|
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 +- Click the Start button on the taskbar.
- Type "Task Scheduler" in the Search box and click the first result that says Task Scheduler.
- Expand the Task Scheduler Library folder in the list pane on the left.
- Right click the Task Scheduler Library folder and choose "New Folder". Give it a name like My Custom Tasks.
- 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).
- Enter a name like "SC2 Replay Backup" for the Name and a description if you want.
- Click the Triggers tab.
- Click New.
- For "Begin the task", choose "At log on".
- Select Specific user and it will only run when you are logged in.
- Under Advanced Settings, check Repeat task every and choose "5 minutes" for the first box and a duration of "Indefinitely" for the second box.
- Click OK.
- Click the Actions tab.
- Click New.
- Type wscript.exe in the Program/script box.
- 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.
- Click OK twice
- 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 +- Click the Start button on the task bar.
- Click Run...
- Type "control schedtasks" (minus quotes) in the box and click OK. This is a shortcut to the Scheduled Tasks applet.
- Go to File-New-Scheduled Task. This bypasses the useless "Add Scheduled Task" wizard.
- Give the new task a name like SC2 Replay Backup
- Right click the new task and choose Properties
- 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.
- Check the "Run only if logged on" box.
- Click the Schedule tab
- 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.
- Click the Advanced button.
- Check the Repeat task box.
- Change the interval to every 5 minutes, or as often as you like.
- Change the duration box to 24 hours.
- Click OK.
- Click the Settings tab.
- Uncheck "Stop the task if it runs for..."
- 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.
|
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
|
|
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.
|
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.
|
This can be done without dropbox just by using Windows Task Scheduler. Good solution though.
|
blahman, please check your inbox.
|
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.asp2b) Install and Run Karen's Replicator ![[image loading]](https://dl.dropbox.com/u/3104902/1.jpg) 2c) Create a "New Job" ![[image loading]](https://dl.dropbox.com/u/3104902/2.jpg) - 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]](https://dl.dropbox.com/u/3104902/4.jpg) 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]](https://dl.dropbox.com/u/3104902/5.jpg) - 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.xmlIf 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.
|
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
|
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
|
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"
|
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.
|
|
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.
|
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?
|
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.
|
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.
|
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?
|
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
|
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.
|
On July 31 2010 06:24 Ownos wrote: 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. Release version still autodeletes which I unfortunately found out the hard way. :/
I'm having some troubles getting the script to work properly, it outputs the time stamp as hour-year-month-day-minutes which seems really odd to me.
Is it because my settings(Swedish, although the windows installation is in English) use a 24 hour clock? If so, how would I tweak the code for it to output correctly?(I'm on winXP if that matters)
|
Yes as I warned in my post, the date parser needs to be tweaked if you run a non-standard US English locale.
There didn't seem to be much interest so I gave up on rewriting it to account for other locales.
But I'll take another look.
|
I was really hoping Starcraft would implement this functionality with 1.0, but now I'm definitely going to set this up.
|
I'm getting a wonky error for the invisible.vbs part, the copy bit works excellent though.
Script: C:\spel\StarCraft II\invisible.vbs Line: 1 Char: 1 Error: Subscript out of range Code: 800A0009 Source: Microsoft VBScript runtime error
Running on a windows 7 EN US computer, with swedish time if that matters. Dose anyone have an idea for how to fix it? I dont know VB well enough where to start looking...
|
Wow, thats awesome man, thx a lot!
|
On August 01 2010 02:20 Rags wrote:I'm getting a wonky error for the invisible.vbs part, the copy bit works excellent though. Show nested quote + Script: C:\spel\StarCraft II\invisible.vbs Line: 1 Char: 1 Error: Subscript out of range Code: 800A0009 Source: Microsoft VBScript runtime error
Running on a windows 7 EN US computer, with swedish time if that matters. Dose anyone have an idea for how to fix it? I dont know VB well enough where to start looking...
I get this too. Works fine though.
|
On August 01 2010 02:20 Rags wrote:I'm getting a wonky error for the invisible.vbs part, the copy bit works excellent though. Show nested quote + Script: C:\spel\StarCraft II\invisible.vbs Line: 1 Char: 1 Error: Subscript out of range Code: 800A0009 Source: Microsoft VBScript runtime error
Running on a windows 7 EN US computer, with swedish time if that matters. Dose anyone have an idea for how to fix it? I dont know VB well enough where to start looking...
this most likely means that the arguments aren't being specified correctly, check that you have quotes around each of the arguments.
|
On August 01 2010 03:23 Blahman wrote:Show nested quote +On August 01 2010 02:20 Rags wrote:I'm getting a wonky error for the invisible.vbs part, the copy bit works excellent though. Script: C:\spel\StarCraft II\invisible.vbs Line: 1 Char: 1 Error: Subscript out of range Code: 800A0009 Source: Microsoft VBScript runtime error
Running on a windows 7 EN US computer, with swedish time if that matters. Dose anyone have an idea for how to fix it? I dont know VB well enough where to start looking... this most likely means that the arguments aren't being specified correctly, check that you have quotes around each of the arguments.
I copy-pasted it though.
CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False
|
not there, in your scheduled task, how are you calling wscript?
|
Sorry, I'm not following. I followed the direction at the top of page 2 verbatim.
|
Are you running 7/Vista or XP?
In 7/Vista, you set the program to run (wscript.exe) in the "Program/Script" box and the arguments in the "Arguments (optional)" box.
The first argument is the path to invisible.vbs, surrounded by quotes. The second argument is the path to sc2replays.bat, also surrounded by quotes. E.g.
"c:\path to\invisible.vbs" "c:\path to\sc2replays.bat"
In XP you set the arguments as part of the whole command string in the "Run" box. I have not tried this on XP but I believe the syntax is the same just all in one long string, such as:
wscript.exe "c:\path to\invisible.vbs" "c:\path to\sc2replays.bat"
|
I was trying to find a program like this, thanks.
|
On August 01 2010 04:47 Blahman wrote: Are you running 7/Vista or XP?
In 7/Vista, you set the program to run (wscript.exe) in the "Program/Script" box and the arguments in the "Arguments (optional)" box.
The first argument is the path to invisible.vbs, surrounded by quotes. The second argument is the path to sc2replays.bat, also surrounded by quotes. E.g.
"c:\path to\invisible.vbs" "c:\path to\sc2replays.bat"
In XP you set the arguments as part of the whole command string in the "Run" box. I have not tried this on XP but I believe the syntax is the same just all in one long string, such as:
wscript.exe "c:\path to\invisible.vbs" "c:\path to\sc2replays.bat"
Wooo, thanks man. Works without a error now.
|
On July 12 2010 12:20 GreatestThreat wrote: You could also, you know, just save them each time you finish a game that you thought was worth keeping around. There's a save replay button right in the score screen.
Excellent first post though, I'm sure somebody will find a use for it!
You can forget. When I get into the zone I just keep going on to the next game and it's easy to overlook. If I would save few replays you might have a point but this is defiantly something useful.
|
On August 01 2010 06:51 baeracaed wrote: Wooo, thanks man. Works without a error now. Cool good to hear.
In other news I am very close to having a more universal date parser so people using other locales should be able to use this. It's not 100% as there are some very weird exceptions in the hundreds of locales out there, but it should work for the vast majority.
|
I've updated my original post with the new date parser code -- be sure to grab it and set it up again if you are running a non-US English locale.
|
|
I have never used that program myself so I couldn't say for sure, but it probably uses a similar amount of resources to monitor a folder. In either case it's probably so extremely minimal that it's not worth fretting over. Just use whatever solution works for you.
The other consideration is I doubt that app can do the automatic renaming my script does:
- Removes any (1), (2) etc. after the map name.
- Adds the date/time modified to the filename so that it is unique and will never overwrite a replay
Unless it has some built-in scripting support which would invariably add some overhead.
|
On August 01 2010 08:18 Blahman wrote:I've updated my original post with the new date parser code -- be sure to grab it and set it up again if you are running a non-US English locale. Works like a charm! Thanks a bunch!
|
Thank you so much Blahman! This looks like it probably took you a while to do. I for one appreciate your work and am glad the community has people like you to make the difference whenever BNet 2.0 comes up short.
|
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.
|
Never mind think I figured it out. Updated my post with an XP guide.
|
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.
|
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
|
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.
|
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.
|
Okay thank you blahman you are amazing! Thank you!
Gahh, Im having more problems, Getting an error. Messaging you blah
|
This was exactly what I was looking for. Thanks =D
|
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)
|
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).
|
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!
|
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
|
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.
|
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.
|
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)!
|
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.
|
|
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
|
|
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 ^^
|
|
is there away to extract the players names?
|
There's ways to get at the info inside the replays, but it's not nearly as straightforward as what's been presented in this thread already. So far, the methods shown here get all info from the file name (as it has been saved by SC2) and the date modified field of the file. So while it can be done, it seems beyond the scope of this thread.
A current solution for adding players' names to the filename exists in SC2Gears. You can batch rename all your files using that program, or even have it automatically save replays (though as stated before in this thread you have to leave the program running while playing for that to work).
|
On September 10 2010 13:57 sid17 wrote: 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 ^^
All I can suggest is read the thread/instructions carefully, you're probably just entering something wrong in your Task Scheduler/Scheduled Tasks setup. Quotes are important, as are paths to the scripts.
|
On September 11 2010 05:37 Tobit wrote: There's ways to get at the info inside the replays, but it's not nearly as straightforward as what's been presented in this thread already. So far, the methods shown here get all info from the file name (as it has been saved by SC2) and the date modified field of the file. So while it can be done, it seems beyond the scope of this thread.
A current solution for adding players' names to the filename exists in SC2Gears. You can batch rename all your files using that program, or even have it automatically save replays (though as stated before in this thread you have to leave the program running while playing for that to work).
Yeah that would involve actual work 
If anyone knows of a replay parser that works on the command line and isn't a PITA to set up (no PHP) I might make a version of the script that can do this.
|
Happy to report that in 1.2 this script will be made redundant by an in-game option to save all replays!
|
does anyone know how to get the cmd.exe to end after it saves? when i schedule this it leaves the cmd.exe running in the background, so if my computer is on for many hours i eventually get like 400 processes running in the background.
sorry to bump the thread but anyone know what i'm talking about here?
|
On December 13 2010 04:53 Blahman wrote: Happy to report that in 1.2 this script will be made redundant by an in-game option to save all replays! But will it auto-save with timestamps? If not, I think I will stick with the solution in the OP.
|
On December 18 2010 21:58 IgnE wrote: does anyone know how to get the cmd.exe to end after it saves? when i schedule this it leaves the cmd.exe running in the background, so if my computer is on for many hours i eventually get like 400 processes running in the background.
sorry to bump the thread but anyone know what i'm talking about here?
make sure the script isn't pausing. at the end of the main code block there is a line that says rem pause, make sure it has a rem before it, otherwise it will sit there waiting for your input.
if that's not it, try running the script from a command line and see where it's getting hung up.
|
On December 19 2010 01:54 Alsn wrote:Show nested quote +On December 13 2010 04:53 Blahman wrote: Happy to report that in 1.2 this script will be made redundant by an in-game option to save all replays! But will it auto-save with timestamps? If not, I think I will stick with the solution in the OP. 
good point, no it does not, it just makes them unique by appending a number in parentheses after the map name.
|
FYI you'll need to update your source path if you were using "Unsaved" before, as now it puts unsaved multiplayer replays in the Unsaved\Multiplayer folder now.
for example, (for Windows 7) change:
set source=C:\Users\USER\Documents\StarCraft II\Accounts\12345\1-A1-1-12345\Replays\Unsaved
to
set source=C:\Users\USER\Documents\StarCraft II\Accounts\12345\1-A1-1-12345\Replays\Unsaved\Multiplayer
|
|
|
|