Thursday, 15 July 2010

command line - How does one access $PWD variable on windows? -


How to use the corresponding directory for $ PWD in the $ PWD variable to use the current directory under linux itemprop = "text">

Does it?

This is for users with a unix background, given the information about mklink, a Windows Link utility, I have found that the syntax of mklink is

  mklink "C: \ where \ link \ is \ to be created \ file.txt" C: \ where \ file \ actually exists \ file.txt "  

but I >

  mklink $ PWD "want to replace with c: \ where \ file \ actually exists \ file.txt"   

but the error of using $ PWD Throws I come from Linux world Or $ PWD is referred to the current working directory.

What will be the correct syntax so that the link $ PWD is executed whenever the script is executed? < / P>

Edit: As I have found, answer% cd%

mklink CMD.exe is a sub-order, it should be "inside" of CMD.xe. From PowerShell, you can say:

  CMD / C mklink # without algues mklink help you Interpretation is   

Online help here :. You have the option of file softlinks, directory softlinks, hardlinks, and directory junctions.

Sometimes it may be difficult to use the CMD sub order from PowerShell due to the need for childish characters. In PSV 3 this situation has improved with magic -% View this blog for details. Search for "easy reuse of command lines from CMD.exe"

No comments:

Post a Comment