Created
December 14, 2017 00:34
-
-
Save BedirYilmaz/cb0bb20bcb1b592a4738edebb624b066 to your computer and use it in GitHub Desktop.
Py script that renames a file to names of its parent folders : to be used with find_rename_and_copy.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import shutil | |
import sys | |
import string | |
pathStr = sys.argv[1] | |
splittedPath = string.split(pathStr, '/') | |
upper = splittedPath[-3] | |
upper_2 = splittedPath[-5] | |
shutil.copy(pathStr, upper_2 + upper + 'output.mp4') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment