Extracting and renaming files from a bunch of folders

Hello guys,
So i’ve got a folder with a bunch of other folders in it. In these folders are .tif Files and i need to move them from the smaller folder all in one big folder and rename them like this: “smallerfoldername_filename.tif”. is there a possibilty to do that with powershell?

Hi Georgrdw, welcome to the forum!

Of course there is! Recommend you search for the topic in your preferred search engine. There are hundreds, if not thousands of examples you should be able to use to achieve your desired result. You should quickly find Get-ChildItem to query the items and Move-Item to move it. I’d recommend using the -WhatIf parameter on Move-Item to confirm what will happen. Once you’re satisfied with the reported outcome, you’d remove -WhatIf to actually complete the move. Hint: you can rename while you move. Good luck!

1 Like

Thank you very much. The Problem is that i have no skills in powershell and im looking for a copy and paste solution yk :sweat_smile: but maybe i’ll find it somewhere. Thank you :slight_smile: