Skip to content

Commit

Permalink
Update move-file.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
samhippo authored Apr 27, 2020
1 parent aa82b86 commit b6a660c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion move-file.lua
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit b6a660c

Please sign in to comment.