Good morning/afternoon! I got really busy, started working on a reply. I need to correct my initial response.
(_run "C:\\tools\\sync.bat")
It worked! Yay!
But in my real code I have spaces in the naming of directories so tested to find the culprit.
(_run "C:\\Test Test\\sync.bat")
Doesn't work
So I tried chr(34) to add double quotes.
(_run "chr(34) & c:\\Test Test\\sync.bat & chr(34)")
Returns nil, doesn't work
Tried using ascii code for space
(_run (strcat "c:\\test" "& chr(32) &""test\\sync.bat"))
Returns nil.
Any ideas?
For some reason I can't execute the function like this (_run "c:/tools/sync.bat")
You're right. I can't get it to work either .. perhaps you could use THIS if you're just updating files. I know this one works as I've been using it for years.
It's working here, both types of paths:
)
)
;; (_run (setq path (strcat (getenv "userprofile") "\\Desktop\\Test.bat"))) ;;<-Works here
;; (_run (vl-string-translate "\\" "/" path)) ;;<-Works here