| 1 |
ninoborges |
8 |
"""
|
| 2 |
|
|
|
| 3 |
|
|
Reassemble.py
|
| 4 |
|
|
|
| 5 |
|
|
This program will take a file of <filename>, <oldFilePathWithName> and move the file out of the current dircory
|
| 6 |
|
|
and put it back in the OldFile path place. This was for a situation where they needed to work on a bunch of
|
| 7 |
|
|
files that were in nested dirs but needed them in 1 big dir. I make a file with the above format, then moved the
|
| 8 |
|
|
files into that one big folder, they did their thing, and this prg put it all back(since the file names didnt change)
|
| 9 |
|
|
|
| 10 |
|
|
Created by
|
| 11 |
|
|
Emanuel Borges
|
| 12 |
|
|
06.12.08
|
| 13 |
|
|
|
| 14 |
|
|
"""
|
| 15 |
|
|
|
| 16 |
|
|
import os
|
| 17 |
|
|
|
| 18 |
|
|
|
| 19 |
|
|
|
| 20 |
|
|
if __name__ == '__main__':
|
| 21 |
|
|
startDir = r"\\lasads01\data\cli\Manny\Copied"
|
| 22 |
|
|
contents = open(r"\\lasads01\data\cli\Manny\PDFCat_Output.txt").readlines()
|
| 23 |
|
|
for line in contents:
|
| 24 |
|
|
line = line.replace("\n","")
|
| 25 |
|
|
(fileName, newFullPath) = line.split(',')
|
| 26 |
|
|
os.rename(startDir + "\\" + fileName, newFullPath)
|
| 27 |
|
|
|