Welcome To Snipplr


Everyone's Recent Snippets Tagged files



used to sort out empty music-files
0 1698 posted 16 years ago by 1b0t
An answer to the 'cycle-special-files exercise listed here: http://stackoverflow.com/questions/41522/tips-for-learning-elisp/59589#59589
0 3571 posted 16 years ago by bigfaceworm
count files in a given dir
2 1624 posted 16 years ago by fackz
0 1314 posted 16 years ago by smoover
Like python's os.listdir
1 1684 posted 16 years ago by iloveitaly
0 1142 posted 16 years ago by skrippendorf
For a client I needed a bit of code that could split one file (html, editable through wysiwyg editor) to multiple files, since all files would by default become very long. This code splits one file by the <h1> tag. Easy for end-users to set. Use CSS...
0 1446 posted 16 years ago by axtg
0 1347 posted 16 years ago by rafa
1 1554 posted 16 years ago by glends
find . | xargs grep 'string' -sl The -s is for summary and won't display warning messages such as grep: ./directory-name: Is a directory The -l is for list, so we get just the filename and not all instances of the match displayed in the results...
2 2049 posted 16 years ago by mattkenefick
There is a similar snippet on the site, yet it is listed for Windows Powershell, while the syntax is clearly Batch, and secondly, it is very incomplete and no response is coming from the author, so I'm posting my completer version here. Beware, th...
4 2021 posted 16 years ago by Vordreller
delete all files in a directory that are more than 7 days old.
4 2057 posted 16 years ago by fackz
The .jpg extension can be changed to any extension. So if you want to pull out only .txt files, you just need to replace the .jpg with .txt. If you want to list ALL files, just remove the condition.
1 1917 posted 16 years ago by fackz
I always forget this.
0 1333 posted 16 years ago by tclancy
This is a function that selects files from a directory and orders them by the last time they were changed, in ascending or descending order. The snippet also calculates how much time passed since the file’s content was changed.
2 2379 posted 16 years ago by fackz
0 1322 posted 16 years ago by smoover
0 1338 posted 16 years ago by counter202
1 1014 posted 17 years ago by fruehjahr
3 1819 posted 17 years ago by fruehjahr
Requires all Ruby source files in a given directory.
1 1450 posted 17 years ago by jccovey
This was copied off wordpress FTP plugin
0 1418 posted 17 years ago by luizlopes
Example code would remove all files/folders recursively starting from the current folder named file_name
0 1446 posted 17 years ago by jturmel
Some times you need some specific range of lines from a file and the commands 'head' and 'tail' are not enough for you. This could be a easy solution for this problem.
2 1981 posted 17 years ago by Juanje
Unzip files with PHP.
1 1671 posted 17 years ago by mattkenefick
4 1694 posted 17 years ago by iTony