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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T00:27:47+00:00 2026-06-04T00:27:47+00:00

Need Windows .bat file tech support. I am having trouble running Win 7 bat

  • 0

Need Windows .bat file tech support.
I am having trouble running Win 7 bat files which loop through tokens and variables. The script below works on my wifes PC, and should on all PCs, but does not on mine.

** I am running Windows 7 in VMWare off my Mac.

The file is located at the root of c:

This short little script, and any others like it with tokens gives me errors ( I copied the script below out of the .bat file ):

setLocal ENABLEDELAYEDEXPANSION
set SCHEMA_one= first
set SCHEMA_two= second
set SCHEMA_three= third

@ECHO ON
FOR /F "tokens=2* delims=_=" %%A IN ('set SCHEMA_') DO (
    echo "looping through " %%A
)
endLocal

I get the following error:

C:\>FOR /F "tokens=2* delims=_=" %A IN ('set SCHEMA_') DO (echo "looping through " %A )  
'set SCHEMA_' is not recognized as an internal or external command, operable program or batch file.

Ideas???

Many thanks in advance. I have been stuck for hours and hours…

  • 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-04T00:27:48+00:00Added an answer on June 4, 2026 at 12:27 am

    EDIT- I DID find the answer.. Complete user error..

    At some point, the COMSPEC environment variable path got changed, and so was WRONG!!!! With a typo!!! :/ So lame.

    While comparing env variables between my new environment and old, I finally noticed the typo. Man, one character cost me hours and hours. I didn’t realize before ( though its obvious now ) that was the path used for the bat command or I would have given it more scruteny. Not sure why it worked at all (???)

    ================
    Well, I am not happy with the fix- because it was a BIG hammer. But I installed a new Windows 7 VM, and now I can run the script.
    Earlier In stalled a newer version of the vm- 3.1.4 ( the newest free upgrade from my 3.1.2 ) and that did not solve the problem.
    And before that I tried the things suggested above ( Many thanks to the people who posted above! )

    Not sure what is screwed up with my windows install, but it’s something.. I’ve compared against other computers, and my environment args all look good. Java is good, etc. Just something about either my user account on that VM, or …? Not sure. Ran out of time, had to move on. 🙂

    If I figure it out I will post the answer. In the mean time I’ll be setting up and hopefully working from this new VM.

    cheers!
    Dustin

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

Sidebar

Related Questions

Newbie to windows scripting. I need help running the .bat file on the command
When windows is displaying the files through Window Explorer I need to have the
I need to translate a linux batch file into a windows bat file. for
I'm new to Windows batch files, but I'm writing a .bat file that just
My OS is Windows Vista. I need to have a .bat file where I
I'm trying to create a shell and bat file in which I need to
I have a windows.bat file which is actually my custom installer. When everything is
Having read the post at .bat files, nonblocking run/launch , I still cannot achieve
This is a batch file in Windows. Here is my .bat file @echo off
Possible Duplicate: Windows batch files: .bat vs .cmd? Hi, I am learning Windows Batch

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.