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