file/directory format/size help

2006-12-24 Thread moishyyehuda
Hi I am writing a script to upload images. How do I check the format of the file? How can I tell if the file is an image, movie, or text file? I would also like to put a limit on how much a user can upload. So how can I check how many bits, bytes, mb, gb are in a folder. So that sums up to #1

Re: file/directory format/size help

2006-12-24 Thread Steven D'Aprano
On Sun, 24 Dec 2006 07:45:32 -0800, moishyyehuda wrote: Hi I am writing a script to upload images. How do I check the format of the file? How can I tell if the file is an image, movie, or text file? I would also like to put a limit on how much a user can upload. So how can I check how many

Re: file/directory format/size help

2006-12-24 Thread Stef Mientki
#1 What type of file is the file? Is it a movie, image, or text document? In the Windows world, one simply looks at the file extension (e.g. .gif, .avi, .txt, etc.) and hopes that it is correct. or simply use TRID: http://mark0.net/soft-trid-e.html Stef Mientki --