Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby-on-rails-4/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Powershell中是否有用于移动文件的特定命令?_Powershell - Fatal编程技术网

Powershell中是否有用于移动文件的特定命令?

Powershell中是否有用于移动文件的特定命令?,powershell,Powershell,我一直在尝试使用Microsoft Powershell移动文件, 我在微软的网站上看过了,不明白说明。 以下是目录内容,如Get ChildItem所示: Directory: C:\Users\Username\lpthw Mode LastWriteTime Length Name ---- ------------- ------ ---- d----- 5/19/202

我一直在尝试使用Microsoft Powershell移动文件, 我在微软的网站上看过了,不明白说明。 以下是目录内容,如
Get ChildItem
所示:

    Directory: C:\Users\Username\lpthw


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----        5/19/2020   6:38 PM                useful
-a----         5/9/2020   2:08 PM            263 drill5.py
问:我想知道如何将文件
drill5.py
移动到
usive


执行命令时收到错误:`mv drill5.py有用``mv drill.py有用mv:找不到路径'C:\Users\Username\lpthw\drill.py',因为它不存在。什么错误?`Move Item-Path.\drill5.py-Destination.\usive\`该错误表示该文件不存在:C:\Users\Username\lpthw\drill.py是否存在该文件?+CategoryInfo:ObjectNotFound:(C:\Users\Username\lpthw\drill.py:String)[Move Item],ItemNotFoundException n+FullyQualifiedErrorId:PathNotFound,Microsoft.PowerShell.Commands。MoveItemCommand@JonyHadary您的错误是
drill.py
,而不是
drill5.py
-您是否忘记键入
5
?为什么不搜索-第一个结果指向Microsoft提供的文档。
Move-Item -Path .\drill5.py -Destination .\useful\

# Another way. mv is an alias for Move-Item
mv .\drill5.py .\useful\