( approvedFile, unapprovedFile )
| 15 | |
| 16 | |
| 17 | def approveFile( approvedFile, unapprovedFile ): |
| 18 | justFilename = unapprovedFile[len(rootPath)+1:] |
| 19 | if os.path.exists( unapprovedFile ): |
| 20 | if os.path.exists( approvedFile ): |
| 21 | os.remove( approvedFile ) |
| 22 | os.rename( unapprovedFile, approvedFile ) |
| 23 | print( "approved " + justFilename ) |
| 24 | else: |
| 25 | print( "approval file " + justFilename + " does not exist" ) |
| 26 | |
| 27 | if files: |
| 28 | for unapprovedFile in files: |