jjatho Posted November 21, 2014 Posted November 21, 2014 I've managed to come up with my own tweaks to autopublish that rename the output file with data from the .dwg (with vl-file-rename), and have got the same .lsp script creating folders for me (with vl-mkdir), but I can't seem to find any info on moving files. Is there a quick and easy command for taking a file from one location and moving it to another? I figure I could copy the file to the new location, then delete the original, but I assume there must be an easier way. Quote
BIGAL Posted November 21, 2014 Posted November 21, 2014 Under the operating system Move is a valid command so you may be able to use SHELL Move \oldproject\XYZ.dwg \newdir\project Vl-file-copy & Vl-file-delete appear to be valid http://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/complete-list-of-vl-vla-and-vlax-functions/td-p/4666405 Quote
Lee Mac Posted November 22, 2014 Posted November 22, 2014 Is there a quick and easy command for taking a file from one location and moving it to another? I figure I could copy the file to the new location, then delete the original, but I assume there must be an easier way. If I recall correctly, you can use vl-file-rename to move files from one location to another. Quote
jjatho Posted November 24, 2014 Author Posted November 24, 2014 If I recall correctly, you can use vl-file-rename to move files from one location to another. Confirmed, this worked. Thanks! Quote
hanhphuc Posted November 24, 2014 Posted November 24, 2014 Confirmed, this worked. Thanks! if you have many files batch move entire files from folder to destination folder as suggested by BIGAL example: move all acad backup files*.bak from a picked folder to temp folder (vl-cmdf "shell" (strcat "move \"" (vl-string-right-trim "\\" (strcat (acet-ui-pickdir "" ""))) "\\[color="red"]*.bak[/color]\" \"" (getvar "tempprefix") "\"" ) ;_ end of strcat ) ;_ end of vl-cmdf - alternative - copy paste to notepad, save as (all file) "test.vbs" double click the file to invoke CreateObject("Scripting.FileSystemObject").MoveFile "C:\Documents and Settings\XP\My Documents\[color="red"]*.bak[/color]", "c:\temp\" vbs source from msdn Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.