What is the alternative for ~ (user's home directory) on Windows command prompt?

前端 未结 10 1594
离开以前
离开以前 2020-11-30 18:10

I\'m trying to use the command prompt to move some files, I am used to the linux terminal where I use ~ to specify the my home directory I\'ve looked everywhere

10条回答
  •  忘掉有多难
    2020-11-30 19:12

    You can do almost the same yourself. Open Environment Variables and click "New" Button in the "User Variables for ..." .
    Variable Name: ~
    Variable Value: Click "Browse Directory..." button and choose a directory which you want.

    And after this, open cmd and type this:
    cd %~%
    . It works.

提交回复
热议问题