Bluebird1973 Posted October 10, 2017 Posted October 10, 2017 Hello together, I need help. I have a emergency lisp for a bunch of User to set all System Variable back, but this doesn't work for e.g. LOGFILEPATH I tried this: ... (setq xxx (getvar 'loginname)) (setq LOGP (strcat "\\\\Server\\Folder\\" xxx)) (setvar "LOGFILEPATH" LOGP) ... Can anybody tell me what I'm doing wrong? kind regards Blueburd1973 Quote
Bluebird1973 Posted October 10, 2017 Author Posted October 10, 2017 Hi ronjonp, No, the path exist. I think the problem is the stored loginname at the symbol "xxx". It seem that it doesn't connect at the STRCAT. kind regards Bluebird1973 Quote
ronjonp Posted October 11, 2017 Posted October 11, 2017 I can only replicate an error if the path does not exist. Try this: (if (findfile (setq path (strcat "\\\\Server\\Folder\\" (getvar 'loginname)))) (setvar "LOGFILEPATH" path) (print (strcat path " not found...")) ) Quote
Jef! Posted October 11, 2017 Posted October 11, 2017 I don't see why the xxx symbol would cause any issues, unless it contains a \ inside (which seems unlikely) Can you try that and tell me if it works? Change (setq LOGP (strcat "\\\\Server\\Folder\\" xxx )) for (setq LOGP (strcat "\\\\Server\\Folder\\" xxx "\\")) Quote
Bluebird1973 Posted October 12, 2017 Author Posted October 12, 2017 Hi ronjonp and Jef!, It works! (if (findfile (setq LPath (strcat "\\\\SERVER\\FOLDER\\" (getvar 'loginname) "\\"))) (setvar "LOGFILEPATH" LPath) ; (print (strcat LPath " not found...")) (setvar "LOGFILEPATH" (strcat "c:\\users\\" (getvar 'loginname) "\\appdata\\local\\temp\\")) ;default path ) There was only the "\\" missing. Thank you guys!!! kind regards Bluebird1973 Quote
ronjonp Posted October 12, 2017 Posted October 12, 2017 Hi ronjonp and Jef!, It works! There was only the "\\" missing. Thank you guys!!! kind regards Bluebird1973 Strange .. either path works for me? BTW ... you could shorten the temp path to: (setvar 'logfilepath (getenv "temp")) Quote
Recommended Posts
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.