Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Delzuma
Dec 4, 2004

I've got a few network shares attached to my Mac (and Win 10 machine if that makes it easier) with an epic shitton of folders in them. All I want to do is go through all the folders, find a specific file type and move those files to a different folder (basically find all jpgs in the myriad folders and move them all into one jpeg folder). I'm willing to do whatever. I'd appreciate an easy way to do this whether it be software or whatever. Any help is appreciated.

Also apparently I can't spell common. I'm a dumbass

Delzuma fucked around with this message at 18:57 on Oct 23, 2016

Adbot
ADBOT LOVES YOU

The Pell
Feb 6, 2008
I think you can do this in terminal:

code:
find SOURCE -name "FILE" -print0 | xargs -0 -I {} mv {} DESTINATION
So, lets just say I want to move every single excel spreadsheet to my desktop:

code:
find / -name "*.xlsx" -print0 | xargs -0 -I {} mv {} ~/Desktop/
You might need to use sudo if you dont have permissions for all the potential data sources.

Mo_Steel
Mar 7, 2008

Let's Clock Into The Sunset Together

Fun Shoe

Delzuma posted:

I've got a few network shares attached to my Mac (and Win 10 machine if that makes it easier) with an epic shitton of folders in them. All I want to do is go through all the folders, find a specific file type and move those files to a different folder (basically find all jpgs in the myriad folders and move them all into one jpeg folder). I'm willing to do whatever. I'd appreciate an easy way to do this whether it be software or whatever. Any help is appreciated.

Also apparently I can't spell common. I'm a dumbass

You can do this in Powershell pretty easily on Windows 10; create a new folder where you want them to go (I used "jpgs" on my desktop as an example below) and then modify the line of code below to match your share location name and destination name:

code:
Get-ChildItem f:\%sharename%\*.jpg -recurse | Move-Item -Destination c:\users\%yourname%\desktop\jpgs\
Once you've got the share location and destination location modified, copy and paste the whole line into a new Powershell window and hit Enter to run it. If you're concerned about the output first, add the -whatif switch to the end like this:

code:
Get-ChildItem f:\%sharename%\*.jpg -recurse | Move-Item -Destination c:\users\%yourname%\desktop\jpgs\ -WhatIf
That will log what the output would look like without actually doing it. By default Move-Item won't overwrite files into the destination if they have the same name, and it also won't delete them from their original location if there's a conflict (you'll know because powershell will throw you a red nasty message about it).

  • Locked thread