Console Commands

Console Commands and the Command Line

Did you know that, and unlike M$ systems almost everything you can run using a GUI '''(Graphical User Interface)''' you can replicate using the command line and believe it or not from the command line things start to speed up. Why would you use scripting how could you benefit from using it, well say you had a web site most people have one or more that they and others contribute to. Now let say this same web site accepts the posting of images, now whilst everyone has the best intentions and despite good clear instructions on the web site itself, the web site has no filters to determine if the postings are in the correct format that the image size is correct and so on.

Using a script or if you like a batch file you can search for newly added images read their file name convert this to lower case and remove or replace troublesome file names that include spaces. Thats not all you can also convert the Image size to web safe sizes 800x600 and 1024x768 for those extra large images with more detail and even thumbnail images, additionally you can move all the converted material to a web directory for use within that web site, file user group and owner permissions can also be changed using the same script. A cron job can then be constructed to periodically run and scan for each new entry.