The tutorial is aimed at users of Mac OS X, who need to share a large number of files in a folder, in multiple folders.
In our case, the problem looks like this:
We have a folder "PSD" which contains 2105 files, and these files we 2105 to create folders each containing no more than 300 file.
To achieve this, the most simple and convenient we command line from Port.
1. open Port and navigate to the folder in which fisirele that we want to share. In our case the order will be:
cd / Volumes / Stealth / Graphics / PSD.
2. View the number of existing files and folders in current location:
ls -l | wc -l .
Before proceeding to step 3 is better to make sure that the folder files are not blocked (locked files). If any, during the execution will receive error message "Operation not permitted". With the help of the command "-R chflags nouchg *"We will unlock all files in the current location (Unlock multiple files in Mac OS X).
3. Command line divide the total by which the files in the current folder, the folder that contains a defined number of files:
i = 0; for f in *; do d =psd_$ (Printf% 03d $ ((i /3001))); mkdir -p $ d; mv “$ f” $ d; let i ++; done
Where "psd_" is the prefix of the folders to be created, and "300" is the maximum number of files per folder. These parameters can be modified according to your preferences.
Here is what this tutorial looks like in Terminal:
This tutorial has been tested and realized MacBook Pro cu OS X Yosemite.