Skip to content

Instantly share code, notes, and snippets.

@LewisGet
Created October 4, 2024 20:40
Show Gist options
  • Save LewisGet/b72e4ee4fa6dad55d93c483f5b3ab5e0 to your computer and use it in GitHub Desktop.
Save LewisGet/b72e4ee4fa6dad55d93c483f5b3ab5e0 to your computer and use it in GitHub Desktop.
import subprocess
import glob
import sys
import os
for i in glob.glob("./*"):
t = subprocess.check_output(["file", "--mime-type", "-b", i], shell=True)
t = t[-4:-1]
if t == b"mp4":
command_line = "cp " + i + " " + i + ".mp4"
os.system(command_line)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment