diff --git a/plugin/fzf.vim b/plugin/fzf.vim
index 291756832246c498eb9a1c617309ee0d09877556..8c8ff85572d7d045865a097e4616245b011d680d 100644
--- a/plugin/fzf.vim
+++ b/plugin/fzf.vim
@@ -524,6 +524,7 @@ function! s:execute(dict, command, use_height, temps) abort
     let batchfile = s:fzf_tempname().'.bat'
     call writefile(s:wrap_cmds(command), batchfile)
     let command = batchfile
+    let a:temps.batchfile = batchfile
     if has('nvim')
       let s:dict = a:dict
       let s:temps = a:temps