Message 1 of 6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello how are you.
Could you teach me how to do these three things.
I have some folder and file paths and I need to extract some specific things.
File and folder paths may vary.
Case 1
I have a folder path and I want it to return the penultimate folder, in this case "my folder"
(setq path-folder "D:\\folder1\\folder2\\my folder\\txt\\")
"my folder"
Case 2
I have a file path and I want it to return the file name without the extension.
(setq path-file "D:\\folder1\\folder2\\my folder\\txt\\archivo.xxx")
"archivo"
Caso 3
I have a file path and I want it to return the file name with the extension.
(setq path-file-ext "D:\\folder1\\folder2\\my folder\\txt\\archivo.xxx")
"archivo.xxx"
Beforehand thank you very much.
AutoCAD 2026
Visual Studio Code 1.99.3
AutoCAD AutoLISP Extension 1.6.3
Windows 10 (64 bits)
Solved! Go to Solution.