---
title: "Troubleshooting the PATH Environment Variables in Windows · Junaid Qadir"
description: "Have you been freaking out whole day about why the heck the command prompt keeps throwing an error instead of just executing it, saying that ‘foo’ is not recognized as an internal or external command,"
url: "https://junaidqadir.com/blog/trouble-with-path-environment-variables-in-windows"
date: "2011-12-28"
tags: ["environment-variables", "operating-systems", "troubleshooting", "windows"]
---

# Troubleshooting the PATH Environment Variables in Windows

Have you been freaking out whole day about why the heck the command prompt keeps throwing an error instead of just executing it, saying that

> ‘foo’ is not recognized as an internal or external command,  
> operable program or batch file.

and you can clearly see that _c:foo_ is in the **PATH** of the Environment Variables.

When I tell you that you have an extra space just after the **;** then you’d be like “hey! that was pretty easy man!”.

In case you are still in a limbo, let me tell it the ol’fasioned way.

Remove **any spaces** after of before the **semicolon** that separates paths in the PATH variable otherwise system cannot find the program you want to run from the command prompt.

The program foo won’t work:

PATH=c:windowssystem32\*\*; c:foo\*\*;c:barbin  
PATH=c:windowssystem32;\*\*c:foo ;\*\*c:barbin

I hope that helps someone out there.

[Operating systems](https://junaidqadir.com/blog/tag/operating-systems)[Windows](https://junaidqadir.com/blog/tag/windows)

---

Markdown version of https://junaidqadir.com/blog/trouble-with-path-environment-variables-in-windows
Site guide for agents: https://junaidqadir.com/llms.txt
Full index: https://junaidqadir.com/sitemap-index.xml
