1
我有一個家庭作業問題,我不能得到它的結束:
Write a shell that has two folder names as parameters and moves the second folder as subfolder of the first one and adds '.unu' to all filenames in that second folder.
PowerShell的舉動目錄,並添加擴展
這是我寫的,但它不工作:
gci D:\powershell\dir2 | foreach-object{ ren -new ($_.Name + ".unu")}
Copy-Item -Recurse D:\powershell\dir2.unu D:\powershell\dir2
Remove-Item -Recurse D:\powershell\dir2.unu
還可以看到我在D:\powershell
2個文件夾量身定做的,我想你是不是真的用管道在這裏dir1