Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8264539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T04:29:37+00:00 2026-06-08T04:29:37+00:00

I need 3 different batch files for 3 different tasks: -log the output of

  • 0

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…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T04:29:39+00:00Added an answer on June 8, 2026 at 4:29 am

    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:

    for /f "tokens=3" %G in ('findstr /i /c:"checking..." log.txt')do echo %G>>_.log
    

    May it works for you.

    Update:
    I download your log.txt and test immediately,this is the result(file names _.log):

    /
    cstrike
    cstrike\bin
    cstrike\cfg
    cstrike\classes
    cstrike\maps
    cstrike\maps\graphs
    cstrike\maps\soundcache
    cstrike\materials
    cstrike\materials\brick
    cstrike\materials\buildings
    cstrike\materials\carpet
    cstrike\materials\composite
    cstrike\materials\concrete
    cstrike\materials\console
    cstrike\materials\cs_assault
    cstrike\materials\cs_havana
    cstrike\materials\cs_italy
    cstrike\materials\cstrike
    cstrike\materials\de_aztec
    cstrike\materials\de_cbble
    cstrike\materials\de_chateau
    cstrike\materials\de_dust
    cstrike\materials\de_nuke
    cstrike\materials\de_piranesi
    cstrike\materials\de_prodigy
    cstrike\materials\de_tides
    cstrike\materials\de_train
    cstrike\materials\decals
    cstrike\materials\decals\concrete
    cstrike\materials\decals\metal
    cstrike\materials\decals\wood
    ...
    

    Maybe i misunderstood your meaning?

    Update again

    As for 3rd question

    @echo off
    set /p origin=Where is the original folder?(Type absoulute path directly.)
    echo origin: %origin%
    set /p destin=Where can i put file temporarily(Type absoulute path directly.)
    echo destination :%destin%
    
    
    for /f %%G in (_.log) do (
    if "%%G"=="/" (
        echo.
    ) else ( 
        xcopy %origin%\%%G %destin%\%%G /H /K /R /E /D /I /Y 
    ))
    
    rm -rf %origin%
    set /p origin=What is the name of original folder?(Type name)
    rename %destin% %origin%
    

    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.

    @echo off
    setlocal enabledelayedexpansion
    set MAXNUM=100
    
    set /p origin=Where is the original folder?(Type absoulute path directly.)
    echo origin: %origin%
    set backup_origin=%origin%
    
    for /L %%H in (1,1,%MAXNUM%) do (
    for /F "delims=\" %%G in ("!origin!") do (
    set name=%%G
    set origin=!origin:%%G\=!
    ))
    set father=!backup_origin:\%name%=!
    
    xcopy !father!\!name! !father!\backup_!name! /H /K /R /E /D /I /Y
    ::copy files
    rm -rf !father!\!name!
    ::delete origin
    rename !father!\backup_!name! !name!
    ::rename the new folder using the old's name
    

    if your files are in such an format C:\template\example\cstrike\materials\brick,you should just type c:\template\example,which includes \hl2 \cstrike and 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,rename working for you.T

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a console application which will be initiated by different batch files set
I need to copy multiple files in a single batch file. The files have
I have files being uploaded to a folder. I need a batch script to
I need to make a batch of writes to the same file but at
I have steps in the batch job that does different things. But before I
I'm coding an android app for parsing sms messages. I need different rules for
So long story short, i have some forms (2) of them that, need different
I need a different random number for each row in my table. The following
I have three different development machines. Do I need three different iPhone Developer Program
I have a Maven multi-module project and I need two different parent POMs in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.