Last active
February 13, 2019 06:28
-
-
Save towfiqpiash/dda706d833fa07ec62f30c3e7c11d113 to your computer and use it in GitHub Desktop.
Revisions
-
towfiqpiash revised this gist
Feb 13, 2019 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -11,4 +11,6 @@ os.rename(dirname + "/" + filename, dirname + "/" + str(filename[5:])) #x = int(filename[:-4]) #os.rename(dirname + "/" + filename, dirname + "/" + str(mynames[x]).rstrip()+".svg") ## Thanks Mosharrof Rubel vai for the script :D -
towfiqpiash created this gist
Feb 13, 2019 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ f = open('list.txt', 'r') mynames = f.readlines() print(mynames) f.close() import os os.getcwd() dirname = "/home/piash/Desktop/Test/files/" for i, filename in enumerate(os.listdir(dirname)): if 'saved' in filename: os.rename(dirname + "/" + filename, dirname + "/" + str(filename[5:])) #x = int(filename[:-4]) #os.rename(dirname + "/" + filename, dirname + "/" + str(mynames[x]).rstrip()+".svg")