Skip to content

Commit

Permalink
Update move-file-subfolder.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
samhippo authored Apr 27, 2020
1 parent e89eb48 commit aa82b86
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion move-file-subfolder.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ function main(subfolder)
local thisFolder, _ = utils.split_path(string.gsub(mp.get_property("path"), "/", "\\"))
local destFolder = utils.join_path(thisFolder, subfolder)
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-subfolder", main)

0 comments on commit aa82b86

Please sign in to comment.