Windows cmd提示移动文件

标签 windows file file-io cmd directory

我正在学习 Windows 命令提示符,我输入了 move file.txt/file。在 c:\dir 时。

file.txt彻底消失。知道它去了哪里,或者它被删除了吗?

>C:\
>>\dir
>>>\file
>>\dir2
>>>\file

最佳答案

可能在现代 DOS shell 中 / 在作为参数传递时已经被识别为 \ 的替代路径分隔符。测试显示您的文件已移动,就像您运行一样:

move file.txt \file

这意味着将file.txt移动到当前驱动器的根目录并将其命名为file授予\file不是一个现有目录。如果 C: 是您当前的驱动器,它现在应该存在为

c:\file

move/?:

[drive:][path]filename1

Specifies the location and name of the file or files you want to move.

destination

Specifies the new location of the file. Destination can consist of a drive letter and colon, a directory name, or a combination. If you are moving only one file, you can also include a filename if you want to rename the file when you move it.

关于Windows cmd提示移动文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24967699/

相关文章:

Java启动具有受限文件读/写权限的应用程序

objective-c - 使用异步 NSURLConnection 获取本地文件是否过度?

c - 预览窗口后屏幕状态的 Aero 功能是什么?

c# - 为什么我不能在 Windows 10 计算机上使用 HttpListener? (System.PlatformNotSupportedException)

C++ 立即调用析构函数,即使遵循三规则

java - 开发 Google App Engine 应用程序时无法在本地测试中使用相对路径访问文件

windows - 排除 WASAPI 中环回模式捕获的数据

c++ - 如何解析列式存储格式的 XML 文件?

c - 更新和删除文件内容

c++ - 从文件中检索记录并分配给变量