Windows 命令提示符下 ~ (用户的主目录)的替代方法是什么? [英] What is the alternative for ~ (user's home directory) on Windows command prompt?

查看:22
本文介绍了Windows 命令提示符下 ~ (用户的主目录)的替代方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用命令提示符来移动一些文件,我习惯了使用 ~ 指定我的主目录的 linux 终端我到处找,但似乎找不到 Windows 命令提示符(Documents and Settings[user])

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

推荐答案

你会失望的:%userprofile%

不过,您可以使用其他终端.Powershell,我相信你可以在 XP 及更高版本上使用(并且预装在 Win7 中),它允许你使用 ~ 作为主目录.

You can use other terminals, though. Powershell, which I believe you can get on XP and later (and comes preinstalled with Win7), allows you to use ~ for home directory.

这篇关于Windows 命令提示符下 ~ (用户的主目录)的替代方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆