Welcome To Snipplr


Everyone's Recent Snippets Tagged files



Come modificare i permessi di tutti i files (senza toccare le cartelle) o viceversa
0 72 posted 9 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 155 posted 9 years ago by Sazabi02
Counts the number of times that a file has been downloaded, using PHP and mySQL
0 88 posted 9 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 135 posted 9 years ago by kubaitis
Returns an array of files that match a search term in a certain directory.
1 70 posted 9 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 176 posted 9 years ago by trusktr
-print0 and -0 are used to allow for spaces and other wacky chars in file names
0 79 posted 9 years ago by jfine
Loops through all files of a certain extension in the specified directory. Can be used to list all images in a given directory.
0 112 posted 10 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 82 posted 10 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 73 posted 10 years ago by kossmoss
Delete a directory including its contents.
0 78 posted 10 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 95 posted 10 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 65 posted 10 years ago by vigoncas
Count number of files in a directory
1 69 posted 10 years ago by marcelodornelas
works with fugue icons, but can be custumized
0 69 posted 10 years ago by renaars
This is another way to get a list of files ordered by upload time.
1 165 posted 10 years ago by fackz
Read a file from the FileSystem
0 110 posted 10 years ago by allnatural
0 43 posted 10 years ago by bigredjoe
without scandir() function
0 86 posted 10 years ago by stancox