Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
4  
There'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 2

up vote 3 down vote accepted

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).

share|improve this answer
    
+1, Less keystrokes yet! –  Chris S Jul 21 '10 at 20:21
    
There are also some nice 3rd party tab completion things that may make this interaction nicer. –  Joey Jul 24 '10 at 5:46

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.