Closed GoogleCodeExporter closed 8 years ago
Must also support tmp directory. I have several instances where receiver picks
up all files in monitored directory, even *.tmp
Original comment by mjg1964
on 7 Sep 2013 at 2:59
currently I have done this with subclassing ftp disconnect in
communicationscript based on filename or folder name ending with 'tmp'.
# rename files to remove .tmp extensions
if self.channeldict['filename'].endswith('.tmp'):
try:
for f in self.session.nlst('*.tmp'):
self.session.rename(f,f[:-4])
except:
pass
# rename files from tmp subdirectory to parent directory
# assumes all files have an extension, sub-dirs do not
if self.channeldict['path'].endswith('/tmp'):
try:
for f in self.session.nlst('*.*'): # files only!
self.session.rename(f,'../%s' %f)
except:
pass
Original comment by mjg1964
on 22 Dec 2013 at 12:08
yes!
I am looking on how to implement this 'as upward compatible a possible.
henk-jan
Original comment by hjebb...@gmail.com
on 22 Dec 2013 at 7:23
hard to make this general. especially for directories.
could use a extra attribute 'append as tmp indicator'; but this only works for
the file part. Think this would cover most use cases?
Original comment by hjebb...@gmail.com
on 28 Dec 2013 at 3:30
Original issue reported on code.google.com by
hjebb...@gmail.com
on 6 Sep 2013 at 5:13