Working with Huge Numbers of Files at Once

Joined
Apr 29, 2006
Messages
4,576
Reaction score
378
Points
83
Location
St. Somewhere
Your Mac's Specs
Mac Studio, M1 Max, 32 GB RAM, 2 TB SSD
There was a recent thread in this forum that is now closed (not sure why) on the topic of moving something like 21,000 files all at once. The thread was:

http://www.mac-forums.com/forums/showthread.php?t=10083

I hate to be a Luddite, but the best approach here may be the command line. You can move a nearly infinite number of files with a command like:

mv *.jpg ../Pictures

This would move EVERY jpg file, no matter how many, from the current directory to the home folder's Pictures directory. This example assumes the files are currently somewhere like your Documents folder - if it was different, the destination path name might be a bit different too.

For large volume file operations, things like the command "cp" (copy) and "mv" (move) commands are the easiest way to go!

Not even Luddites are wrong all the time!! :dive:
 
Joined
Jun 25, 2005
Messages
3,231
Reaction score
112
Points
63
Location
On the road
Your Mac's Specs
2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid
I'm more interested in this statement;

"You probably hit some limitations of the Finder, one thing I know for sure you can't copy more than 65k files at a time."​

Is that per folder, or in entirety. I was not aware of a limit.

It probaly explains why a drag-n-drop backup of my home folder chokes when it gets to my e-mail folders. I have a lot of e-mails. At least I don't have to restart.

[RANT]
As for your note of the mv command. I can only hope some of the less experienced people don't pick up on that. There are some truely silly people that act first and ask later how to fix their latest mistake. It would at least be tolerable if they could construct their question in a way that didn't make them look like they were on drugs.
[/RANT]
 
Joined
Jan 19, 2007
Messages
6
Reaction score
1
Points
3
Mv or cp don't work either.
You will get: "-bash: /bin/mv: Argument list too long" since the asterix is interpreted by the shell which just creates a huge argument list for the command.
Go for some pro file manager.
The 65k limit is for the selection, if you are copying one folder with 100000000 sub-items it is ok.
 
Joined
Feb 2, 2004
Messages
12,455
Reaction score
604
Points
113
Location
PA
Your Mac's Specs
MacBook
There was a recent thread in this forum that is now closed (not sure why)
It was closed because it wasn't recent. The thread date was 10-14-2004. It was never responded to then, and since the member is no longer active, there was no need to resurrect the thread.
Searching is good for finding answers to common issues, but when the thread hasn't seen any action in over two years, it is best to let sleeping dogs lie. :black: Use it for reference, for information, for knowledge... but not for posting.
If that is the case, then it is okay to just start a new thread. There is no sense in dragging a dead thread back to life. :)
 
OP
mac57
Joined
Apr 29, 2006
Messages
4,576
Reaction score
378
Points
83
Location
St. Somewhere
Your Mac's Specs
Mac Studio, M1 Max, 32 GB RAM, 2 TB SSD
Thanks D3v1L80y. Was the act of closing it that brought it to the top again? I don't THINK I was searching at the time, just going through the forums as usual. I wonder if closing it causes it to pop back to the top of the list... thoughts?
 
OP
mac57
Joined
Apr 29, 2006
Messages
4,576
Reaction score
378
Points
83
Location
St. Somewhere
Your Mac's Specs
Mac Studio, M1 Max, 32 GB RAM, 2 TB SSD
kupak, you are absolutely right - I failed to consider that. I work with large numbers of files all the time via the command, but never this large. I should have considered that it could overflow the argument space. My mistake. My apologies to all for the "bum steer"!
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top