I'm trying to switch from cmd.exe to Powershell, but I'm very annoyed by the fact that if I try to execute something from the current folder, I have to type .\ before it, just like in Linux. Is there a way to disable this without adding the current folder or . to PATH?
Asked
Active
Viewed 141 times
2
-
4There's really good security reasons that ".\" isn't in the path by default anymore. You should consider how rarely you want to run a program from the current directory before enabling this. – Chris S Jul 21 '10 at 20:20
2 Answers
3
If you are using tab complete, type the first few letters and press tab. It will automatically prepend .\
and if you keep pressing tab, it will keep suggesting the file name you need until you get to it (if there's more than 1 similar file name).

Ben Pilbrow
- 12,041
- 5
- 36
- 57
-
-
There are also some nice 3rd party tab completion things that may make this interaction nicer. – Joey Jul 24 '10 at 05:46
2
Just like Linux, you'll have to add ".\" to your path. Powershell doesn't have a way to say, "automatically prepend .\ to %PATH%." The path statement will have to be modified.

sysadmin1138
- 133,124
- 18
- 176
- 300