Friday, April 6, 2018

Re: system succeed vs job_start fails on windows cmd

Le vendredi 6 avril 2018 21:42:24 UTC+2, Ni Va a écrit :
> Hi,
>
> This following func success to execute cmd through system( call and not through job_start call.
>
> I have read job_start help that says on windowsmake a GUI app hidden but not fails it.
>
> How can I proceed?
> Thank you in advance
> NiVA
>


>
> fun! monitoring#rmdir(folderpath) "{{{
>
> let cmd='cmd /c timeout /t 10 && rmdir /q /s "\\?\'.helper#shellescape(fnamemodify(a:folderpath,'%:p')).'"'
>
> echomsg job_start(cmd) "Fails
> echomsg system(cmd) "Succeed
>
> endfunc "}}}



fun! monitoring#rmdir(folderpath) "{{{
let cmd='cmd /c start /min timeout /t 5 /nobreak | rmdir /q /s "\\?\'.helper#shellescape(fnamemodify(a:folderpath,'%:p')).'"'
echomsg job_start(cmd)
endfunc "}}}

Seems better..

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: