ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/ns_dev/Python/NinoCode/Active_prgs/AppendTiffExt.py
Revision: 8
Committed: Sat May 5 04:21:19 2012 UTC (13 years, 10 months ago) by ninoborges
Content type: text/x-python
File size: 508 byte(s)
Log Message:
Initial Import

File Contents

# User Rev Content
1 ninoborges 8 import os
2    
3     def ExtRename(args, dirName, filesInDir):
4     for file in filesInDir:
5     if os.path.isfile(dirName + "\\" + file):
6     Ftail = file[-4:]
7     if Ftail.upper() == "TIFF":
8     pass
9     elif Ftail.upper() == ".TIF":
10     pass
11     else:
12     os.rename(dirName + "\\" + file, dirName + "\\" + file+ ".tif")
13    
14     if __name__ == '__main__':
15     startDir = r"T:\fixMe"
16     arg = ""
17     os.path.walk(startDir,ExtRename, arg)