from functiontest import *
import sys
import subprocess
from pathlib import Path
import os

#droppedFile = sys.argv[1]
#droppedName = Path(droppedFile).name
output_folder_name ="/bulk_convert_out/"

droppedFile = ['test.mkv']

#get path of script location and remove the tail
head_tail = os.path.split(sys.argv[0])
output_path = head_tail[0]
arguments = sys.argv[1:]

#check if output folder exists, otherwise create it
isExist = os.path.exists(output_path+output_folder_name)
if not isExist:
    os.makedirs(output_path+output_folder_name)

for file in droppedFile:
    subprocess.run(function(file, output_folder_name))
