Jump to content

Moving a file from one place to another?


jjatho

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...