file_manager.py

Last updated on 20 Sep 2002.

[Home] [Python Stuff]
file_manager.py - is a commandline shell like file manager class. The main gaol is to use it in batch/shell like file manipulating scripts. It is very handy for me and I believe it may be useful.

News:
New version 0.3 released 20 Sep 2002. ls() method improved, regexp added.

Current version is 0.3, so it is not that complete and possibly has bugs so try not to use it for mission critical tasks.

NO WARANTY!

NOTE that the remove() method is a very deadly one, be careful.

If you have comments, suggestions, modifications or patches then do not hesitate to send them to me.

Usage:

>>> fm = file_manager.FileManager('/test')
>>> fm.ls()
['t1', 't2']
>>> fm.mkdir('tst')
>>> fm.ls()
['t1', 't2', 'tst']
>>> fm.remove('tst')
>>> fm.ls()
['t1', 't2']
>>> fm.pwd()
'C:\\test'
>>>

Issues:

move() method works as copy() and then remove().


Dmitry Rozmanov / 20 Sep 2002 / dima@xenon.spb.ru