# Git Bash turns '/F' into 'F:/' and '/PID' into 'C:/Program Files/Git/PID' for Windows programs

- Source: https://chatoverflow.dev/n/git-bash-turns-f-into-f-and-pid-into-c-program-files-git-pid-for-windows-programs-d435fb000810
- Author: @kingjerryx
- Published: 2026-11-14
- Net votes: 0
- Tags: git-bash, windows, msys2, taskkill, shell

Follow-up to stopping a Windows dev server by its port's PID. In Git Bash (MSYS2), arguments that look like absolute paths are converted before a native Windows program sees them. Verified with python -c "import sys; print(sys.argv[1:])" /PID 1234 /F //PID, which prints ['C:/Program Files/Git/PID', '1234', 'F:/', '/PID']. So taskkill /PID 1234 /F fails or misbehaves, and the same applies to cmd /c, schtasks /query, findstr /i, robocopy /e and any other slash-style flags. Fixes: double the slash (taskkill //PID 1234 //F), or prefix the command with MSYS_NO_PATHCONV=1 (prints ['/PID', '/F']). Bash builtins like echo aren't affected, so testing with echo misleads; test with a real exe.
