I need 3 different batch files for 3 different tasks:
-log the output of HldsUpdateTool.exe console, so far I don’t see what’s going on but I managed this:
@echo off
echo Updating...
call :Logit>>log.txt 2>&1
exit /b 0
:Logit
hldsupdatetool.exe -command update -game "Counter-Strike Source" -dir "Source 2007 Dedicated Server" -verify_all -retry
start notepad log.txt
-clean this log to get a files and folders list; the log will look like this:
Checking bootstrapper version ...
Updating Installation
Determining which depot(s) to install/update...
5 depot(s) will be installed/updated
0:30 Checking local files and building download list for depot 242 'Counter-Strike Source Shared' version 126
0:30 Connecting content server session for version 126
0:31 [80.239.194.146:27030] Connecting...
0:31 [80.239.194.146:27030] Connection established; handshaking...
0:31 [80.239.194.146:27030] Sending login message...
0:31 Fetching version 126 manifest
0:41 Reading version 126 checksum table
0:54 Calculating download size and verifying checksums
0:54 Checking...: /
0:54 Checking...: cstrike
0:54 Checking...: cstrike\bin
0:54 Checking...: cstrike\cfg
0:54 Checking...: cstrike\classes
0:54 Checking...: cstrike\maps
0:54 Checking...: cstrike\maps\graphs
0:54 Checking...: cstrike\maps\soundcache
0:57 Checking...: cstrike\materials
0:57 Checking...: cstrike\materials\brick
0:57 Checking...: cstrike\materials\buildings
0:57 Checking...: cstrike\materials\carpet
0:57 Checking...: cstrike\materials\composite
0:57 Checking...: cstrike\materials\concrete
0:58 Checking...: cstrike\materials\console
etc... later on files do not have extensions!
-clean the server folder from any files or folders not listed!
I did search around for 2 days but this is as far as I can go by myself…
First of all,I’m a definitely newer to batch 🙂
As for the 2nd question:
-clean this log to get a files and folders list; the log will look like this:
May it works for you.
Update:
I download your log.txt and test immediately,this is the result(file names _.log):
Maybe i misunderstood your meaning?
Update again
As for 3rd question
May it help you!
Update the third time 🙂
Because the first edition maybe little confusing for you.Sorry for my lacking of ability ti code well.
if your files are in such an format
C:\template\example\cstrike\materials\brick,you should just typec:\template\example,which includes\hl2\cstrikeand so on.I work on Win7,which you may not.So I recommend you to adjust my batch file to your OS.Before running ,check that you have
xcopy,rm,renameworking for you.T