Recovering deleted files

Rick Johnson rantingrickjohnson at gmail.com
Thu Dec 26 19:10:08 EST 2013


On Wednesday, December 25, 2013 10:44:39 PM UTC-6, George Tang wrote:
> I am new to python and was trying to program with txt
> files, and tried to move the txt file to a new directory.
> i did not read very carefully about what shutil.move(src,
> dst) does and it deleted some of my files. How do i
> recover my lost files. plz help!

Well George that's unfortunate. 

I hate to say "i told you so", but i've been preaching the
importance of testing code that manipulates files for many
years. If only you had run the code a few times and MERELY
printed the src and dst paths to stdout you MIGHT could have
saved yourself a tough lesson.

But all may not be lost. 

If you want to post the relevant bits of the source code we
may find a solution for you. Maybe your path munging was
clumsy and you moved them somewhere unexpected... who
knows???



More information about the Python-list mailing list