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

  • Home
  • SEARCH
  • 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 8159897
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T18:04:21+00:00 2026-06-06T18:04:21+00:00

I have a script in which I read html files which I want to

  • 0

I have a script in which I read html files which I want to edit. Here I paste the code which calls :remove_redundant_columns subroutine.

It should remove the spaces/white spaces from begin of each line and remove from html file. Only problem is that it adds extra text like = to lines which are almost empty, just have few tabs.

The html file which I downloaded is from hidemyass.com/proxy-list/1

call parse_proxy.bat remove_redundant_columns !FILENAME!
exit /b

:remove_redundant_columns
REM Remove whitespaces from begin of lines and <span></span>
FOR /f "tokens=*" %%t in (%1) do (
   SET S=%%t
   SET S=!S:^<span^>^</span^>=!
   if NOT "!S!"=="" >>$tmp$ echo !S!
   )
del %1
REN $tmp$ %1
exit /b
  • 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-06T18:04:23+00:00Added an answer on June 6, 2026 at 6:04 pm

    If you believe, that’s your only problem… You need to check, if your variable S contains content.

    That’s required, as substitution on an undefined variable will not produce an undefined/empty variable, the new content will be the substitution text.

    :remove_redundant_columns
    REM Remove whitespaces from begin of lines and <span></span>
    FOR /f "tokens=*" %%t in (%1) do (
       SET S=%%t
       if defined S (
         SET S=!S:^<span^>^</span^>=!
         >>$tmp$ echo !S!
       )
    )
    

    As dbenham stated, you got many other problems,
    and one additional problem is the echo !S! command itself.

    ECHO has some nasty side effects on different content.
    If the content is empty (or only spaces) then it will print it’s currently state
    ECHO IS OFF
    If the content is OFF or ON it will NOT be echoed, it will only change the state.
    And if the content is /? it will echo the help instead of /?.

    To solve this you could simply change ECHO !S! to ECHO(!S! and all problems are gone.

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

Sidebar

Related Questions

I have a sed script which will read in a file and, if a
I have a script which loops through a list of users (samaccountname): # Read
I have a ajax image upload script which i found here http://www.fengcool.com/2009/06/ajax-form-upload-local-image-file-without-refresh/ The problem
I have script which allows to display Bing search results. I can call for
I have this script which basically toggles a bgColor class on and off so
I have a script which hides (display:none) certain divs in the list on page
I have a script which creates a user-defined object like this: obj = new
I have a script which, each time is called, gets the first line of
I have a script which tracks visits & referers to a website. I send
I have a script which returns a price for a product. However, the price

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.