You could also use something like this to suppress the box from popping up:Code - Auto/Visual Lisp: [Select]
) ) ;; (_run (strcat (getenv "userprofile")"\\Desktop\\Test.bat"))
(_run "c:/tools/sync.bat")
For some reason I can't execute the function like thisCode: [Select](_run "c:/tools/sync.bat")
(_run "C:\\tools\\sync.bat")
It worked! Yay!(_run "C:\\Test Test\\sync.bat")
Doesn't work(_run "chr(34) & c:\\Test Test\\sync.bat & chr(34)")
Returns nil, doesn't work(_run (strcat "c:\\test" "& chr(32) &""test\\sync.bat"))
Returns nil.For some reason I can't execute the function like thisCode: [Select](_run "c:/tools/sync.bat")
You're right. I can't get it to work either:oops: .. perhaps you could use THIS (https://www.theswamp.org/index.php?topic=39415.msg446782#msg446782) 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:Code - Auto/Visual Lisp: [Select]
) ) ;; (_run (setq path (strcat (getenv "userprofile") "\\Desktop\\Test.bat"))) ;;<-Works here ;; (_run (vl-string-translate "\\" "/" path)) ;;<-Works here
(_run "\"C:\\Test Test\\sync.bat\"")
Try:Code: [Select](_run "\"C:\\Test Test\\sync.bat\"")
(_run "\"C:/Test Test/sync.bat\"")
Ok, one more:Code: [Select](_run "\"C:/Test Test/sync.bat\"")
(_run "c:\\Test\\mirsup.bat")
@pushd %~dp0
cls
robocopy "C:\Test" "C:\Test Test" /MIR /XF *.dwl /XF UpdateLog.txt /XF toolsversion.txt /R:10 /W:5 /ETA /TEE /LOG+:ToolsUpdateLog.txt
@popd
robocopy "C:\Test" "C:\Test Test" /MIR /XF *.dwl /XF UpdateLog.txt /XF toolsversion.txt /R:10 /W:5 /ETA /TEE /LOG+:ToolsUpdateLog.txt
Note: If you want to enclose the file name in double quotes you should modify ronjonp's code.This works for me too. Updated my code HERE (https://www.theswamp.org/index.php?topic=53550.msg582650#msg582650).Code - Auto/Visual Lisp: [Select]
; (_run "C:\\Test Test\\sync.bat") => OK ; (_run "C:/Test Test/sync.bat") => OK ) )
I see what you did there..LoL, nope didn't work.Ok, one more:Code: [Select](_run "\"C:/Test Test/sync.bat\"")
here is my sync.bat file
This works well togetherCode: [Select](_run "c:\\Test\\mirsup.bat")
Code: [Select]@pushd %~dp0
cls
robocopy "C:\Test" "C:\Test Test" /MIR /XF *.dwl /XF UpdateLog.txt /XF toolsversion.txt /R:10 /W:5 /ETA /TEE /LOG+:ToolsUpdateLog.txt
@popd
However if I change the sync.bat file to this.Code: [Select]robocopy "C:\Test" "C:\Test Test" /MIR /XF *.dwl /XF UpdateLog.txt /XF toolsversion.txt /R:10 /W:5 /ETA /TEE /LOG+:ToolsUpdateLog.txt
It won't work
Note: If you want to enclose the file name in double quotes you should modify ronjonp's code.Code - Auto/Visual Lisp: [Select]
; (_run "C:\\Test Test\\sync.bat") => OK ; (_run "C:/Test Test/sync.bat") => OK ) )
There's lot's of compelling reasons to use robocopy John.
Agree that task scheduling (or folder watching triggered events) may be a good strategy.
@John, I was kinda set with using Robocopy because I liked how easy it was to use. Though Ron's xcopy solution might work. If I find the time to tweak it a little to fit my needs. I will be giving it a try.
That doesn't look simple at all!
"robocopy "C:\Test" "C:\Test Test" /MIR /XF *.dwl /XF UpdateLog.txt /XF toolsversion.txt /R:10 /W:5 /ETA /TEE /LOG+:ToolsUpdateLog.txt"
It's really no big deal to me what you use but personally I keep things simple as possible. I don't like strings like that because I forget what all of those switches mean and cannot fix problems later.
# Unison preferences file
# This file will preform a sync on "my documents" folder to my USB stick
#
# Last Updated: 01.01.99
#---[ Root ]------------------------------------------------------------
root = C:/Users/<username>/
root = D:/
#---[ Paths ]-----------------------------------------------------------
# Paths to synchronize
path = Documents
#---[ Options ]---------------------------------------------------------
batch = true
# confirmbigdel = false
#---[ Ignore ]----------------------------------------------------------
ignore = Path */Temp
ignore = Name *.tmp
ignore = Name *.example
ignore = Name *.zip
@echo off
call <path>\<to>\<unison>\unison.exe sync_Documents-folder
pause
... Though Ron's xcopy solution might work. If I find the time to tweak it a little to fit my needs. I will be giving it a try.I added some code HERE (https://www.theswamp.org/index.php?topic=39415.msg582702#msg582702) to run RoboCopy out of AutoCAD .. give it a try! :)
... Though Ron's xcopy solution might work. If I find the time to tweak it a little to fit my needs. I will be giving it a try.I added some code HERE (https://www.theswamp.org/index.php?topic=39415.msg582702#msg582702) to run RoboCopy out of AutoCAD .. give it a try! :)
Use like so:Code - Auto/Visual Lisp: [Select]
(rjp-robocopy "C:\\Test" "C:\\Test Test" nil "/MIR /XF *.dwl /XF UpdateLog.txt /XF toolsversion.txt /R:10 /W:5 /ETA /TEE /LOG+:ToolsUpdateLog.txt" )