1

I am trying to move files from one folder to another within the same network drive (Z:). I tried using the following commands in PowerShell 7.2.6:

Move-Item -Path Z:\source\toMove*.jpg -Destination Z:\target

and

Get-ChildItem -Path Z:\source\toMove*.jpg | Move-Item -Destination Z:\target

but progress was extremely slow. I tried moving some of those files by dragging and dropping in Windows Explorer, and it was quite faster this time. I am confused as to why Move-Item doesn't have a performance similar to drag and drop. Am I missing something?

Note: I have read about alternatives, like robocopy, and I will definitely look into those in the morning. My question, though, is to gain understanding on Move-Item, maybe some considerations to keep in mind when working on a non-local drive, and what is different about drag-and-drop in Windows Explorer.

Kevin
  • 242
  • 2
  • 10
  • Did you only test D&D *after* testing in PowerShell? Maybe the files were still in Cache and therefor D&D could do it faster. – stackprotector Oct 27 '22 at 05:13
  • Interesting idea, but I am not sure that's what's happening because I am dealing with several thousand files and over 100GB, so I don't think it is caching but I can't say I am sure. I'll try to run some tests during the weekend with different files – Kevin Oct 28 '22 at 02:31

0 Answers0