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

前端 未结 10 1615
离开以前
离开以前 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:14

    Just wrote a script to do this without too much typing while maintaining portability as setting ~ to be %userprofile% needs a manual setup on each Windows PC while cloning and setting the directory as part of the PATH is mechanical.

    https://github.com/yxliang01/Snippets/blob/master/windows/

提交回复
热议问题