Welcome To Snipplr


Everyone's Recent Snippets Tagged files



Come modificare i permessi di tutti i files (senza toccare le cartelle) o viceversa
0 1597 posted 15 years ago by tuffo19
Modifies the file name in case an existing filename is in the specified path. (Ex: myfile.dat myfile(1).dat myfile(2).dat myfile(3).dat)
0 2376 posted 15 years ago by Sazabi02
Counts the number of times that a file has been downloaded, using PHP and mySQL
0 1458 posted 15 years ago by eme_dlr
I wrote this for an enterprise level event logging cluster that has more traffic than Oprah. Has worked great for years of uptime... wish java had a decent bz2 implementation though.
2 2359 posted 15 years ago by kubaitis
Returns an array of files that match a search term in a certain directory.
1 1669 posted 15 years ago by mattkenefick
Use this to read from a file. It is wrapped in a try/catch statement in case something breaks when trying to read the file. It will simply throw and exception (error) and continue rather than crashing your app.
0 3640 posted 15 years ago by trusktr
-print0 and -0 are used to allow for spaces and other wacky chars in file names
0 1642 posted 15 years ago by jfine
0 1587 posted 15 years ago by raphaelcangucu
Loops through all files of a certain extension in the specified directory. Can be used to list all images in a given directory.
0 1989 posted 15 years ago by sandman7OR
This example shows how to delete specific files after a given time span. This works good for cleaning cached files.
1 2131 posted 15 years ago by fackz
1st shows only files and directories bigger than 1 Megabyte 2nd shows only files and directories bigger than 100 Megabyte
0 1698 posted 16 years ago by kossmoss
Delete a directory including its contents.
0 1640 posted 16 years ago by jrobinsonc
I use this for house keeping logs spat out by a ecommerce system- Just wack it in a batch file and setup a windows scheduled task to kick it off.
2 2337 posted 16 years ago by Shawson
If you have these files: old-file.php file-old.php file-old-file.php license.txt and you apply the snippet then you'll have these files: new-file.php file-new.php file-new-file.php license.txt ;-)
0 1628 posted 16 years ago by vigoncas
Count number of files in a directory
1 1713 posted 16 years ago by marcelodornelas
works with fugue icons, but can be custumized
0 1464 posted 16 years ago by renaars
This is another way to get a list of files ordered by upload time.
1 2279 posted 16 years ago by fackz
Read a file from the FileSystem
0 1602 posted 16 years ago by allnatural
0 1248 posted 16 years ago by bigredjoe
without scandir() function
0 1548 posted 16 years ago by stancox