Welcome To Snipplr


Everyone's Recent Snippets Tagged files



Come modificare i permessi di tutti i files (senza toccare le cartelle) o viceversa
0 472 posted 13 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 1073 posted 13 years ago by Sazabi02
Counts the number of times that a file has been downloaded, using PHP and mySQL
0 506 posted 13 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 738 posted 13 years ago by kubaitis
Returns an array of files that match a search term in a certain directory.
1 515 posted 13 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 1106 posted 13 years ago by trusktr
-print0 and -0 are used to allow for spaces and other wacky chars in file names
0 537 posted 13 years ago by jfine
0 526 posted 13 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 682 posted 13 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 560 posted 13 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 519 posted 13 years ago by kossmoss
Delete a directory including its contents.
0 517 posted 13 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 777 posted 13 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 575 posted 14 years ago by vigoncas
Count number of files in a directory
1 519 posted 14 years ago by marcelodornelas
works with fugue icons, but can be custumized
0 491 posted 14 years ago by renaars
This is another way to get a list of files ordered by upload time.
1 940 posted 14 years ago by fackz
Read a file from the FileSystem
0 529 posted 14 years ago by allnatural
0 385 posted 14 years ago by bigredjoe
without scandir() function
0 501 posted 14 years ago by stancox