# I need help understanding this command syntax error

**URL:** <https://forums.powershell.org/t/i-need-help-understanding-this-command-syntax-error/19767>\
**Category:** PowerShell Help\
**Created:** [June 30, 2022, 10:35pm UTC](https://forums.powershell.org/t/i-need-help-understanding-this-command-syntax-error/19767 "2022-06-30T22:35:50Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![mchahn](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/mchahn/32/2519_2.png) [@mchahn](https://forums.powershell.org/u/mchahn)\
**Post date:** [June 30, 2022, 10:35pm UTC](https://forums.powershell.org/t/i-need-help-understanding-this-command-syntax-error/19767/1 "2022-06-30T22:35:50Z")

</div>

I have no experience with powershell. This command is issued by a python script. It gives an error I don’t understand. Can someone help?

```auto
> "C:\Users\mark\.platformio\packages\tool-mklittlefs\mklittlefs" -b 8192 -p 256 --unpack "unpacked_fs" "C:\Users\mark\apps\tiny\downloaded_fs_0x300000_0xfa000.bin"

At line:1 char:65
+ ... sers\mark\.platformio\packages\tool-mklittlefs\mklittlefs" 
-b 8192 -p ...

```

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [June 30, 2022, 10:47pm UTC](https://forums.powershell.org/t/i-need-help-understanding-this-command-syntax-error/19767/2 "2022-06-30T22:47:35Z")

</div>

Mark,  
Welcome to the forum. 👋🏽

> [@mchahn](#):
>
> This command is issued by a python script.

I actually wonder why you’re using PowerShell in this case. There is no PowerShell code at all. It’s obviously an external executable with its command line arguments.

> [@mchahn](#):
>
> It gives an error I don’t understand.

It tells you PowerShell cannot parse it. And that’s logic because it is not PowerShell code. You could try to tell PowerShell to stop parsing by adding the stop parsing operator `--%` right in front of all command line arguments.

---

<div class="post-metadata">

**Author:** ![mchahn](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/mchahn/32/2519_2.png) [@mchahn](https://forums.powershell.org/u/mchahn)\
**Post date:** [June 30, 2022, 10:57pm UTC](https://forums.powershell.org/t/i-need-help-understanding-this-command-syntax-error/19767/3 "2022-06-30T22:57:21Z")

</div>

I don’t understand what you mean by powershell code. I’m just trying to enter a command line that executes mklittlefs with some params. Isn’t this like a bash command line?

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [June 30, 2022, 11:03pm UTC](https://forums.powershell.org/t/i-need-help-understanding-this-command-syntax-error/19767/4 "2022-06-30T23:03:18Z")

</div>

> [@mchahn](#):
>
> Isn’t this like a bash command line?

PowerShell is one of the available shells on Windows. It might be easier in your case to use CMD instead.

---

<div class="post-metadata">

**Author:** ![mchahn](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/mchahn/32/2519_2.png) [@mchahn](https://forums.powershell.org/u/mchahn)\
**Post date:** [June 30, 2022, 11:13pm UTC](https://forums.powershell.org/t/i-need-help-understanding-this-command-syntax-error/19767/5 "2022-06-30T23:13:10Z")

</div>

I’m getting the exact same error in a cmd window. So there is some parsing error in both powershell and cmd. I need help to understand it. Here is the command and result again (some was missing earlier) …/

```auto
"C:\Users\mark\.platformio\packages\tool-mklittlefs\mklittlefs" -b 8192 -p 256 --unpack "unpacked_fs" "C:\Users\mark\apps\tiny\downloaded_fs_0x300000_0xfa000.bin"
'-b' is not recognized as an internal or external command,
operable program or batch file.

```

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [June 30, 2022, 11:16pm UTC](https://forums.powershell.org/t/i-need-help-understanding-this-command-syntax-error/19767/6 "2022-06-30T23:16:32Z")

</div>

> [@mchahn](#):
>
> `"C:\Users\mark\.platformio\packages\tool-mklittlefs\mklittlefs"`

Are you sure that this is the complete path to the executable you want to run?

BTW: That’s not a PowerShell issue. You may be better off in a Python related forum with “_Windows awareness_”. 😉

---

<div class="post-metadata">

**Author:** ![mchahn](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/mchahn/32/2519_2.png) [@mchahn](https://forums.powershell.org/u/mchahn)\
**Post date:** [June 30, 2022, 11:22pm UTC](https://forums.powershell.org/t/i-need-help-understanding-this-command-syntax-error/19767/7 "2022-06-30T23:22:50Z")

</div>

Yes, I checked the path, it is correct. If I type

```auto
"C:\Users\mark\.platformio\packages\tool-mklittlefs\mklittlefs"

```

I get a help menu from the program mklittlefs so I know it exists and runs. The problem command line is choking on the `-b` param. Is that not how windows handles params?

> That’s not a PowerShell issue

I didn’t claim there was a problem with powershell. I fully understand the command has some syntax problem which is my fault. I ammanually entering this command in powershell, python is not running at all. The command was originally issued by python but I copied it.

Please tell me why it chokes on `-b`. Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [June 30, 2022, 11:49pm UTC](https://forums.powershell.org/t/i-need-help-understanding-this-command-syntax-error/19767/8 "2022-06-30T23:49:05Z")

</div>

> [@mchahn](#):
>
> I get a help menu from the program mklittlefs so I know it exists and runs.

Usually executables for Windows have an extension. You could try to include that. 😉

> [@mchahn](#):
>
> Is that not how windows handles params?

Windows does not handle params at all. CMD does. PowerShell does. Or any other shell you’re using. 😉

> [@mchahn](#):
>
> I didn’t claim there was a problem with powershell.

OK. But this is a PowerShell forum. Here we’re focused on helping with PowerShell code. 😉

> [@mchahn](#):
>
> Please tell me why it chokes on `-b`

I cannot because I don’t know. 🤷🏽‍♂️

You could try to use the full parameter names instead … or reorder the parameters …

```auto
"C:\Users\mark\.platformio\packages\tool-mklittlefs\mklittlefs" --unpack "unpacked_fs" --block 8192 --page 256 "C:\Users\mark\apps\tiny\downloaded_fs_0x300000_0xfa000.bin"

```

---

<div class="post-metadata">

**Author:** ![mchahn](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/mchahn/32/2519_2.png) [@mchahn](https://forums.powershell.org/u/mchahn)\
**Post date:** [June 30, 2022, 11:51pm UTC](https://forums.powershell.org/t/i-need-help-understanding-this-command-syntax-error/19767/9 "2022-06-30T23:51:49Z")

</div>

Thank you ver much for your fast replies. I have tried everything I can think of including your suggestion.

Does anyone else understand windows shell command-line syntax well enough to explain my problem?

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [June 30, 2022, 11:55pm UTC](https://forums.powershell.org/t/i-need-help-understanding-this-command-syntax-error/19767/10 "2022-06-30T23:55:12Z")

</div>

You may try StackOverflow and add the `CMD` tag for your question.

---

<div class="post-metadata">

**Author:** ![mchahn](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/mchahn/32/2519_2.png) [@mchahn](https://forums.powershell.org/u/mchahn)\
**Post date:** [July 1, 2022, 12:19am UTC](https://forums.powershell.org/t/i-need-help-understanding-this-command-syntax-error/19767/11 "2022-07-01T00:19:58Z")

</div>

Thx, I’ll do that.

(extra chars to get rid of obnoxios char min)

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:17pm UTC](https://forums.powershell.org/t/i-need-help-understanding-this-command-syntax-error/19767/12 "2024-05-16T20:17:44Z")

</div>

Closed on May 16, 2024, 8:17pm UTC


