Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
The target directories are all letters of the alphabet. You could take the first letter of each file name and assign it to the corresponding directory.
However this would only work well if the file names' first letters were evenly distributed over the alphabet. In other words if all of the file names were IMGxxxx.jpg then taking the first letter of the file name as the target directory would put all of the files in the "i" directory. That would not be any better than leaving them where they are.
In a case like that you would want to use a characteristic that would split up the files more evenly. Using the creation date would be nice if it were available, but it isn't. Using the last modification date might be a good choice if the images were created over a long period of time and only a few would match any particular date. Of course that could lead to the other problem of having only one picture per target directory and that is no better than leaving them all in one directory. It might even be worse because they would be tedious to access in a file viewer.
Since we don't know anything about the files then you will have to determine some sorting criteria that will lead to a useful result.
Last edited by stress_junkie; 12-26-2010 at 11:50 AM.
So what if it is? We can help someone analyze the problem. We can even help them to develop a script. The only thing that I don't respect is handing a developed solution to the person with no effort on their part. There is no evidence that the OP wants that.
Last edited by stress_junkie; 12-27-2010 at 09:07 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.