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 7722781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T04:16:28+00:00 2026-06-01T04:16:28+00:00

@echo off for /f %%a in (httpd.conf) do ( echo %%a ) I have

  • 0
@echo off
for /f %%a in (httpd.conf) do (
echo %%a
)

I have a file that looks like this:

ServerRoot "C:/xampp/apache"
Listen 80
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so

however when i run the batch file, it outputs this:

ServerRoot
Listen
LoadModule
LoadModule

it appears that cmd is only fetching the line UP TO the first space character… Does anybody know how to get the whole line?

I’ve tried adding options to the for command… these have been tried and these all fail:

for /f "eol=# tokens=1-9 delims=¬"
for /f "tokens=* delims=¬"
for /f "tokens=* delims=:\="
for /f "tokens=1-6"
  • 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-01T04:16:30+00:00Added an answer on June 1, 2026 at 4:16 am

    Add “delims=” to your command in order for it to process lines which include spaces in them. So, your code should look a bit like this:

    @echo off
    for /f "delims=" %%a in (httpd.conf) do (
    echo %%a
    )
    

    Also you can add more delimiters to your list like commas, etc. To do that you just add the characters to the “delims =,+”

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

Sidebar

Related Questions

I have bat file like below with name myBat.bat 1) @echo off set CLASSPATH=%CLASSPATH%;C:\Documents
I have this test.txt file with the following content: @echo off wget -q http://subs.ro/get/21518
If I am iterating over each file using : @echo off FOR %%f IN
Below is my requirement. @echo off cls Set Sleep=0 :start echo This is a
When you make a microsoft batch file, ie: saving @echo off :loop echo HI!
Here's a minimal batch file, demo.bat , to illustrate my problem: @ECHO off set
This is my script @echo off start /d C:\Program Files\Internet Explorer IEXPLORE.EXE http://www.google.com?a=1&b=2 I
I am calling an external program, tracd, from a batch file. @echo off ::turns
I need to modify batch file. I have a batch file that opens many
Basically, we have this here module that we offer to our users that want

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.