TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: MeasureUp on December 11, 2013, 10:29:41 PM
-
I have tried to create a folder in my account name in the "C:\Users\" directory without any success.
It seems that windows prevents creating folders in the "users" directory programmatically.
Any solutions?
Thanks in advance.
-
Some areas are limited to administrator access. So if your user account is not set to be an administrator, you might only be able to view/read those, not change them or create new files/folders inside.
Is this folder meant as some place where you want to save data? If so look into the Application Data folder.
-
Thanks.
It is my own laptop and my account is the only administrative account.
The proposed folder destination is "C:\Users\My_Account_Name".
And yes I want to save data to that folder.
There is same problem to create new folder in"AppData".
-
Are you using double backslashes in your code?
-
Works here: (vl-mkdir (strcat (getenv "userprofile")"\\test"))
-
UAC?
-
UAC?
x2 (UAC is a PITA in windows 7)
-
Thanks to everyone.
I need to check my code again.
I didn't use (getenv "userprofile") but a long list (strcat ...) which has more chances to make mistakes.
I don't know much about environment variables.
It's nice to talk to your guys.
Another question, what are "UAC" and "PITA"?
-
http://lmgtfy.com/?q=PITA
http://bit.ly/rDgolL
-
http://lmgtfy.com/?q=LMGTFY
-
http://lmgtfy.com/?q=LMGTFY
:-D Thanks. I *really* needed that this morning. Nothing like coming in on a Friday off to update licenses and... they don't work.
-
Thanks to everyone again.
I like "LMGTFY" and it's fun.
A small fun piece for the holiday season:
(defun c:LMGTFY (/ GoogleIt GFY)
(setq GoogleIt (getstring T "Enter your words & let me Google that for you: "))
(setq GFY (strcat "http://lmgtfy.com/?q=" GoogleIt))
(startapp (strcat "C:/Program Files/Internet Explorer/iexplore.exe " GFY))
)
:-)
-
BTW, according to that qusetion which I asked, there was a logical error in the "conditional statement 1" in my code:
(if (conditional statement 1)
(create folder in C:/Users/MyName)
(if (conditional statement 2)
(create folder in E:/Library/Projects))
)
And There are 5 lines in the "conditional statement 1".
Now the problem is fixed.
Thanks again.