From b6a660c4d1377faae855019fa86bddbbbf51ac4f Mon Sep 17 00:00:00 2001 From: samhippo <63636707+samhippo@users.noreply.github.com> Date: Mon, 27 Apr 2020 09:27:05 -0700 Subject: [PATCH] Update move-file.lua --- move-file.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)