Alright, let's start at the file name; how--in Autolisp (since that is what you know)--would you parse the file name?
"P123 - Some Name" --> "P<000>123 - Some Name"
Next I'd like you to address the xref paths -i.e. will this break xref paths if you start renaming folders and files? And what happens if someone's accessing a file or folder (the network <WINDOWS> server counts as "someone" too).
BTW, there must be thousands of links for renaming files. And, I've even found a few that list "the best options for...". Like:
https://www.howtogeek.com/111859/how-to-batch-rename-files-in-windows-4-ways-to-rename-multiple-files/
No, these drawings are sans Xrefs, so no problem there.
As far as parsing the filename, grab the directory name then search that directory for a matching filename. If I were to go the LISP route, all I have to go on is a bit of code that I mashed together some years ago, but i'm just now getting back into things of that nature, so tweaking it to what I need is a little cumbersome since I've forgotten a lot of what I knew. I've been involved in other roles and just now coming up for air where I have time to automate and correct a few things I've wanted to do but didn't have the time. Here's the original code, it compiles a txt file with the name of each subdirectory in a given directory:
(DEFUN C:dir_list2 ()
;;;;;;;;;;;;;;;;;;;;;;;;;Select directory to be processed
(setq dfil (getfiled "Select a **FILE** in the directory you want to list, then click on OPEN" "y:/" "*" 0))
(setq wutdir (vl-filename-directory dfil))
(setq wutfiles (vl-directory-files wutdir nil -1))
(setq dwglistfile (strcat wutdir "\\dir_list2.txt"))
(SETQ dwgfiler (OPEN dwglistfile "w"))
(WRITE-LINE wutdir dwgfiler)
(foreach n wutfiles
(WRITE-LINE n dwgfiler)
(princ)
)
(alert "\n***File DIR_LIST2.TXT has been created in the directory you chose.***")
(CLOSE dwgfiler)
(startapp "notepad" dwglistfile)
(princ)
);;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;DEFUN
I appreciate the link, it's one that I've looked at. Still trying to comprehend it.
I've found "advanced renamer" to fit all of my needs, its pretty good for a lot of renaming tasks.
Cheers, Rod.
Thank you, this looks like something I could use.
If I had the time to relearn LISP like I used to know it, I'd more than likely tackle this without asking for help, but I'm trying to do this while things are slow... and that doesn't happen, so this is a small window of opportunity and it's as if LISP is all brand new to me again. I understand how crass it can be to come here asking for people to just solve your problems for you, so I'm doing my best to not be that guy, and still find a solution, although it may be a quick one at that.
Again, thank you for the help! Time to dig in.