Overview
Some Win 10 automation using command *.bat files1. Kill and rerun NEOScavenger.exe process from command line (Quick Load)2. Backuper. Find and copy nsSGv1.sol from NEOScavenger.exe folder to defined backup folder (Quick Save)
Disclaimer
All information, written below, just an example and is provided in the format “as-is”. The Author do not garantee, that this code would work correctly on your own computer, and do not gives you any other warrantees. The Author does not bear any responsibility for the result of your actions with the information below. Use this information at your own risk.
F5/F9
Do you remember those games where F5 key was bound to “Quick Save” command and F9 key was bound to “Quick Load” command? This mechanics was applied to this game to prevent permadeath and to transform rough-like gameplay to the classic role-play gameplay. So, we are programming two bat files, using console commands. Then we are pinning them in task panel and using them like F5 and F9 keys in those “old-good-games”. See the video of the result below:
[link]
F5. Backuping game’s Save
1. Create some new “back up” folder and note its name (e.g. D:NSBackUp)
2. Create new bat file, using code below (see Windows help for additional information on how to create executable files):
Set DateTime=%date:~-10,2%%date:~-7,2%%date:~-4,4%_%time:~-11,2%%time:~-8,2%%time:~-5,2%
Set DateTime=%DateTime: =0%
D:
cd D:NSBackUp
md %DateTime%
@echo off
SetLocal EnableExtensions
for %%i in (C) do (
echo DISK = %%i
for /f “delims=” %%j in (‘2^>nul dir/ad/b/s “%%i:/NEOScavenger.exe?” 2^>NUL ^| findstr /ir “NEOScavenger.exe$”‘) do (
echo Folder = %%j
for /f eol^=^ delims^= %%k in (‘dir /a-d /b “%%jnsSGv1.sol” 2^>NUL’) do (
copy /y “%%j%%k” “%DateTime%”
)
)
)
This code means (by rows):
- Comment DateTime, means that we would detect current date and time
- Define variable, named DateTime, in format DDMMYYYY_HHMMSS (13032020_044155)
- Change drive to D:, where your back up folder is located
- Change subfolder to your back up folder
- Create new subfolder inside, named by DateTime variable (like 13032020_044155)
- Disabling echo to output
- Enabling local extentions
- In cycle, looking for drives in the “in (C)” expression (you may point another drives like in (C D E) to search for saves on another local drives)
- And in each drive searching for the folder named NEOScavenger.exe
- And then in each folder named NEOScavenger.exe we looks for file named nsSGv1.sol
- And then copying nsSGv1.sol file to our DateTime subfolder
*Notes:
- This code is working not too fast, because it searches for folders on selected disk drives each time it runs.
- So, to run faster you need find out the path to your save files manually and change this bat file to copy nsSGv1.sol dierctly from this folder to backup folder:
Set DateTime=%DateTime: =0%
D:
cd D:NSBackUp
md %DateTime%
@echo off& chcp 1251
xcopy “C:UsersUserNameAppDataRoamingMacromediaFlash Player#SharedObjectsUYER3MULlocalhostSteamLibrarysteamappscommonNEO Scavenger/NEOScavenger.exe/nsSGv1.sol” “%DateTime%”
The problem is in “UYER3MUL” expression – its generates randomly, so your path is unique
3. Upper code version is looking for all folders named NEOScavenger.exe, so if this computer is used by different users, who plays NEOScavenger, it would copy save file of the only last user. So, in this case you should use the second variant and locate yours saves folder manually.
4. Pin this file at Task panel and change its icon (see Misc. Section for details)
5. Use this file whenever you want to make backup copy of saved game.
6. Bonus. For those people, who wants to copy current save to the folder with user-defined name:
set /p pset=”Enter save’s name:”
Set DateTime=_%date:~-10,2%%date:~-7,2%%date:~-4,4%_%time:~-11,2%%time:~-8,2%%time:~-5,2%
Set DateTime=%DateTime: =0%
D:
cd D:NSBackUp
md %pset%%DateTime%
@echo off& chcp 1251
xcopy “C:UsersUserNameAppDataRoamingMacromediaFlash Player#SharedObjectsUYER3MULlocalhostSteamLibrarysteamappscommonNEO Scavenger/NEOScavenger.exe/nsSGv1.sol” %pset%”%DateTime%”
So, you may clone previous file, and change it. Then make new pin in Task panel and use this command to save important moments (befor entering events, to replay them any times you wish)
F9. Rerunning NEOScavenger.exe process
1. Locate your NEOScavenger.exe
Use Properties menu of the game in the Steam client library, then choose tab “Local files” and click command “Browse local files”
2. Copy the game path to clipboard (e.g. D:SteamLibrarysteamappscommonNEO Scavenger)
3. Create new bat file, using code below (see Windows help for additional information on how to create executable files):
D:
Set PathNEOScavenger=D:SteamLibrarysteamappscommonNEO Scavenger
cd %PathNEOScavenger%
start /MAX NEOScavenger.exe
This code means (by rows):
- Kill image of task with name Neoscavenger.exe
- Change current disk drive to D: (where your NEOScavenger.exe is located)
- Define path variable, named PathNEOScavenger, pasting data from clipboard (see point 2)
- Changing location from D: to subfolder with file Neoscavenger.exe
- Running NEOScavenger.exe in maximized window
4. Place your bat file to the Task panel (pin) and change its icon (see Misc. Section for details)
5. Use it, when you want to re-loot or re-play some inconvinient game moment from the last save
6. Bonus. And you may open game application, using upper bat file (command to kill process would be ignoring). Also, you may create additional bat file to close application without progress saving:
Misc.
1. To create bat file:
- Create txt file
- Paste code and save it
- Rename file extention txt to bat
2. To pin bat file in task panel, define hot key and change its icon:
- Rename bat file adding additional extention .exe
- Drag its icon to Task panel unti tip “Pin in Task panel” pop ups
- Drop it to Task panel and change its position to the place you like
- Rename bat file deleting previously added .exe extention
- Right click on bat file icon in Task panel
- Then right click on shortcut with the bat file name and run command Properties
- In Shortcut tab delete .exe extention in Target section
- Shortcut key: press [F5] or [F9] if you wish emulate this quick runs and use keyboard instead of mouse
- Run: Max.window for [F9] bat file
- Press button Change icon and find out any icon you like
- Press buttons Apply and OK
*Note: You need to pin bat files to task panel because you run game in maxed window (so Desktop closed by game window) . You need to maximize game window because of fonts sizes (in my humble opinion). You need to change icons of pinned files to differ one bat file from another one.
Files:
Result: