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 but I couldn't seem to find it for windows command prompt (Documents and Settings\[user]
)
相关问题
- Batch - Set variables in for loop
- Override yml configuration in spring-boot with com
- How can the Git command be executed on Windows thr
- RVM error with Requirements installation failed wi
- Typepref command gives no valid counters when runn
相关文章
- PowerShell Pass Named parameters to ArgumentList
- Adb install progress bar
- Bash Centos7 “which” command
- Command binding Unable to cast object of type '
- Using 'python -c' option in Windows comman
- execute file .lnk in Java
- authentication error for mifare card “6982:Securit
- How to replace already-printed text in the command
Update 19th Oct 2018.
In case anyone else tries my approach, my original answer below doesnt handle spaces, eg, the following fails.
I think there must be a way to solve that. Will post again if I can improve my answer.
My Original Answer, still needs work... 7th Oct 2018.
I was just trying to do it today, and I think I got it, this is what I think works well;
First, some doskey macros;
and then then a bat file in my path;
cdtilde.bat
All these seem to work fine;
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 thePATH
is mechanical.https://github.com/yxliang01/Snippets/blob/master/windows/
You can also do cd ......\ as many times as there are folders that takes you to home directory. For example, if you are in cd:\windows\syatem32, then cd ....\ takes you to the home, that is c:\