4072f3b7d6531db5de3317262b36cfc8344f8812
[time-slider.git] / usr / share / time-slider / lib / time_slider / tmp.py
1 #!/usr/bin/python2.6
2 import os
3
4 backupDirs = []
5
6 for root, dirs, files in os.walk("/ts-test/TIMESLIDER/nanmbp"):
7     if '.time-slider' in dirs:
8 #        dirs.remove('.time-slider')
9         backupDirs.append(os.path.join(root, ".time-slider/rsync"))
10         print "root %s" % root
11         s1 = root.split ("/ts-test/TIMESLIDER/nanmbp/", 1)
12         print s1
13
14 for dirName in backupDirs:
15     print "dirName %s " % dirName
16     s1 = dirName.split ("/ts-test/TIMESLIDER/nanmbp/",1)
17     s2 = s1[1].split ("/.time-slider/rsync",1)
18     print s2[0]
19     os.chdir(dirName)
20     dirList = ["toto %s" % d for d in os.listdir(dirName) \
21                 if os.path.isdir(d) and
22                 not os.path.islink(d)] 
23     print dirList