TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: laidbacklarry on October 04, 2011, 11:37:20 AM
-
I know this can be done with dos_rendir from doslib, but we'd like to port all doslib functions (that we use) to lisp. This is the only one we're stuck on... Thanks for any help
-
vl-file-rename
-
e.g.
(vl-file-rename "c:\\docs\\rtfm" "c:\\docs\\lol-ok")
-
Thanks, guys...
-
e.g.
(vl-file-rename "c:\\docs\\rtfm" "c:\\docs\\lol-ok")
:-D
-
If you do a search HERE (http://docs.autodesk.com/CIV3D/2012/ENU/acad-search.html) you come up empty if you search for vl-file-rename *shrug*
-
vl-file-rename
Renames a file
(vl-file-rename old-filename new-filename)Arguments
old-filename
A string containing the name of the file you want to rename. If you do not specify a full path name, vl-file-rename looks in the AutoCAD default drawing directory.
new-filename
A string containing the new name to be assigned to the file.
NoteIf you do not specify a path name, vl-file-rename writes the renamed file to the AutoCAD default drawing directory.
Return Values
T, if renaming completed successfully; nil if renaming failed.
Examples
_$ (vl-file-rename "c:/newauto.bat"
"c:/myauto.bat")TNoteIf the target file already exists, this function fails.
Please send us your comments about this page
-
If you do a search HERE (http://docs.autodesk.com/CIV3D/2012/ENU/acad-search.html) you come up empty if you search for vl-file-rename *shrug*
http://docs.autodesk.com/ACD/2011/ENU/filesALR/WS1a9193826455f5ff1a32d8d10ebc6b7ccc-68c5.htm (http://docs.autodesk.com/ACD/2011/ENU/filesALR/WS1a9193826455f5ff1a32d8d10ebc6b7ccc-68c5.htm)
-
So RTFM would have been absolutely useless to the OP.
-
The rtfm was offered purely for levity, hope it was taken same. Unfortunately Autodesk authors their help much like the Microsoft docs, insomuch as sometimes things are implied or just left out. For example the MoveFolder method of the File System Object can be used to rename a folder but the docs don't reveal that. Chocolate chips cookies for every one in the thread.
-
The rtfm was offered purely for levity, hope it was taken same. Unfortunately Autodesk authors their help much like the Microsoft docs, insomuch as sometimes things are implied or just left out. For example the MoveFolder method of the File System Object can be used to rename a folder but the docs don't reveal that. Chocolate chips cookies for every one in the thread.
What's that, you were able to do something with a command that isn't document? Yeah, that's just an undocumented feature we didn't think you plebeians would care to know about.
-
Something else u might want to consider
http://www.bulkrenameutility.co.uk/Screenshots.php
-
No hate, but not sure how this:
(http://www.bulkrenameutility.co.uk/Shots/BRU_Main_Screen.gif)
will help the OP pen alternates for doslib functions.
On another note, that interface gave me an aneurysm. :doa:
-
The rtfm was offered purely for levity, hope it was taken same.
Then I apologize, I took offense to it.
OK, I'll leave now ... *grin*
-
My fault, I don't know the audience anymore, so the apologies are mine to make; sorry all.
-
My fault, I don't know the audience anymore, so the apologies are mine to make; sorry all.
Accepted. *skips off humming Queen's "Bicycle"*
-
Accepted. *skips off humming Queen's "Bicycle"*
*takes long bong hit*
"I love you man".
-
On another note, that interface gave me an aneurysm. :doa:
:lmao:
The one I use is makes me "slightly" less nauseas. ;)
Though not "strictly" part of this thread, I generally use it to rename those DWF/PDF files I generate from publish. I love the Preview idea to see the changes before you actually perform them, makes for less mistakes.