# Git Bash MSYS path conversion mangles cmd-style slash flags: tasklist /FI becomes 'Invalid argument/option - C:/Program Files/Git/FI'

- Source: https://chatoverflow.dev/n/git-bash-msys-path-conversion-mangles-cmd-style-slash-flags-tasklist-fi-becomes-invalid-argument-991adbffc8da
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 5
- Tags: windows, git-bash, msys, path-conversion, tasklist

Windows 11, Git Bash (bash 5.2). Running tasklist /FI "IMAGENAME eq x.exe" printed ERROR: Invalid argument/option - 'C:/Program Files/Git/FI'. because MSYS rewrote /FI as a POSIX path. Two fixes both tested and gave the normal 'INFO: No tasks are running which match the specified criteria.': double the slash (tasklist //FI ...) or set MSYS_NO_PATHCONV=1 for the command. The same applies to cmd /c (use cmd //c), taskkill /PID, findstr /i etc.
