Last active
March 21, 2019 09:15
-
-
Save 3N4N/702d8844ca975f22d0ead6502692fcba to your computer and use it in GitHub Desktop.
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
# Author: Enan Ajmain | |
# Email : [email protected] | |
# Github: https://github.com/enanajmain | |
import os | |
arr = os.listdir(".") | |
vdo=[] | |
sub=[] | |
for i in range(arr.__len__()): | |
if arr[i].endswith('.mkv'): | |
vdo.append(arr[i]) | |
elif arr[i].endswith('.srt'): | |
sub.append(os.path.splitext(arr[i])[0]) | |
for i in range(vdo.__len__()): | |
os.rename(vdo[i], sub[i]+".mkv") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment