File Management scripts - Top 4 Download

File Management script downloads

Zip and Pickle

This module saves and reloads compressed representations of generic Python objects to and from the disk. ...
Python

Where file search utility

This utility searches all the paths in a semi-colon delimited environment variable list for files matching a given filespec. By default, PATH is used for the enviroment. For example, on my >computerC:where note*.exeC:WINNTsystem32otepad.exeC:WINNTNOTEPAD.EXEThis is useful for finding which executable file will be loaded by default. The optional Environment variable is handy ...
Python

Clean up a directory tree

This script can be used to clean up a directory tree irrespective of whether the directory tree contains non-empty directories. As long as the user has permission to remove the files, this will work.There is no files, thor cleaning a non-empty directory tree in python os module. os.removedirs() cannot be used to ...
Python

Recursive directory listing in HTML

This script contains a function that walks a directory path, listing the files and directories in HTML format. It can sometimes be handy to get a look at an entire directory tree, and HTML is a good way to display it. This script goes through the directory tree using os.path.walk in ...
Python

Watching a directory tree on Unix

This script continuously monitors the paths and their subdirectories for changes. If any files or directories are modified, the callable 'func' is called with a list of the modified paths of both files and directories.'func' can return a Boolean value for rescanning; if it returns True, the directory tree will be ...
Python

Tree

The following program displays the directory structure of a specified path using ASCII characters. The program can optionally display files in addition to directories.This program functions similar to the windows 'tree' command. ...
Python

Iterating through large file like objects

This function provides a simple iterator for the lines of a file-like object. (It also provides a flag for removing/retaining trailing newlines.) I ran into the problem a number of times that I wanted to read-in a very large file-like object (say a GB or two) line by line. This is ...
Python

Dir lower

This script lowers the case of all the items found in a specified directory. ...
Python

Simple File Splitter Combiner module

This module can be used to split any file, text or binary to equal sized chunks. It can also combine the chunks back to recreate the original file.<s. It canOften we need to split big files into many chunks either for saving them to disks, uploading to a web-site or for ...
Python

Simple md5 sum utility

This script is a simple md5 hash utility for generating md5 checksums of files. <hash utilThis mainly useful for systems without an included "md5sum" utility, like OS-X and Win32. It shows just how useful the batteries included philosophy of Python can be, since it leverages the md5 module ...
Python

Counting pages of PDF documents on Mac OS X

Given that PDF is a "native" data format on Mac OS X, it is very easy to get access to some properties of such documents. One is the number of pages. Using Python the necessary code to do this is only about four lines, plus some import and command-line plumbing, etc.This ...
Python

Parsing out EDI messages

A parser I designed to work with HIPAA EDI files. It reads in files and spits out the individual segments without terminators.Requires Python 2.3 or greater. (Use can probably use Python 2.2 with from __future__ import generators at the top...)This parser is currently in use to work with 150-200MB of EDI ...
Python

Relative filepath

This script returns a relative path to the target from either the current directory or an optional base directory. Base can be a directory specified either as absolute or relative to current directory. ...
Python

Quicken QIF file class and conversion

This script contains a simple class to represent a Quicken (QIF) file, and a parser to load a QIF file into a sequence of those classes. ...
Python

Dupinator

Point this script at a folder or several folders and it will find and delete all duplicate files within the folders, leaving behind the first file found of any set of duplicates. It is designed to handle hundreds of thousands of files of any size at a time and to do ...
Python

Decorator

This script defines a "decorator" that, rather than decorating the function, calls it, passing it a file object that it had opened as the first argument.Of course, it makes sure to close the file upon the function's return (or nonreturn) with a try...finally block. One can use this decorator to get ...
Python

Backup your files

Backup your files script makes backup versions for your files.It can be used for non-python source code also. ...
Python

File Unzip

File Unzip is a Python class to extract zip files. It's also written for easy use as a standalone script from the commandline. While there are many ways to add files to a zip archive via python, I have been unable to locate a good solution of extracting those same files ...
Python

Generic file processor method

Generic file processor method script helps you to manage files. Old LineReader class was thrown to /dev/null - fd will really be exhausted during each call of process(), so a simple method is enough. ...
Python

Checks for a valid POSIX filename

Checks for a valid POSIX filename script allows you to check for a valid POSIX filename. ...
Python