diff --git a/move-file.lua b/move-file.lua index 36ab097..dde52fd 100644 --- a/move-file.lua +++ b/move-file.lua @@ -1,6 +1,8 @@ +local utils = require "mp.utils" function main(destFolder) local fileToMove = string.gsub(mp.get_property("path"), "/", "\\") - mp.commandv('run','cmd.exe', '/C', 'md', destFolder ,'&','move', fileToMove, destFolder) + local args = {'cmd.exe', '/C', 'md', destFolder ,'&','move', fileToMove, destFolder} + utils.subprocess({args = args, playback_only = false}) mp.commandv('playlist-remove','current') end mp.register_script_message("move-file", main)