Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Adamp172

macrumors newbie
Original poster
Jun 19, 2018
1
0
Does anybody have a script that would allow me to copy selected files to another folder but instead of the generic file match check for conflicts, I would like it to only check for name regardless of file type so that I don’t end up with multiple of the same song for example but just in different formats.
 
Naïvely, it may work with a script that lists the files in a directory and then for each entry removes the suffix from the filename and copies 'filename.*'. I guess you could combine the 'find' and 'sed' commands to this ends.

The side effect would be that if you have multiple files with the same prefix but different suffixes, you'd end up with the last copied version of the file regardless of whether that's actually the copy you want to keep.
Naturally, if you have multiple copies of the same song and anything else in the file name differs, you'd still end up with multiple copies of the same song.
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.