I have a script which is copy the file source to user workspace when run the script. here i need to get current user workspace from commandline. Can you help me how to get it on both Windows and Linux
Thanks in advance – sri
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
What exactly do you mean by Workspace? If you mean the user’s home directory, you can get this via the environment variable
$HOMEon Linux, and I think the equivalent on Windows would be%HOMESHARE%(not totally sure about the last one, because I am on a Domain computer with roaming profiles right now, and I’m not sure if there is any special setup on it.