I have a homework problem and I can't get to the end of it:
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.
This is what I wrote but it doesn't work:
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
also you can see I made in D:\powershell 2 folders and I want to move dir2 in dir1