我有一个家庭作业问题,我无法完成它:
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.
这是我写的,但它不起作用:
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 个文件夹中制作,我想搬进dir2
去dir1