Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Windows 7 Environment variables

27 Feb 2014   #1
ahpitre

Windows 7 Home Premium 64
 
 
Windows 7 Environment variables

Is there an Environment variable that can tell me where the Documents folder is located? Typically, the Documents folder is located in C:\Users\username\Documents.

I am creating a batch file to copy 1 file from a remote location (another computer in the network) to the Documents folder. Since the location can vary on each computer, I would like to use an environment variable to avoid any errors. I ran Set from the command prompt, I got a list of all environment variables, but don't see anything related to the Documents folder.:)


My System SpecsSystem Spec
.
27 Feb 2014   #2
Kari

Microsoft Community Contributor Award Recipient

 

Assuming the Documents folder is located in Users\Username\Documents, it can be found with %userprofile%\documents.

This works also if user profiles are relocated to another partition or drive but not if the Documents folder is located outside the main user profile folder using Folder Properties > Location > Move.
My System SpecsSystem Spec
Reply

 Windows 7 Environment variables




Thread Tools




Similar help and support threads
Thread Forum
how i backup windows environment variables ?
Hi about windows environment variables , can i backup them ? may i know where does windows 7 store them ? thanks
General Discussion
Environment Variables
Hi I set up a User defined Enviro. Var. called GomFolder to be C:\Users|Damo\MyDocuments\NinjaTrader 7 See the attached clip 2015-01-23_1242 - Judge101010's library My understanding is that this should set up a folder called GomFolder in the NinjaTrader 7 folder. Is this correct? If...
General Discussion
Windows 7 Environment Variables List
Environment Variable Path %ALLUSERSPROFILE% C:\ProgramData %APPDATA% C:\Users\{username}\AppData\Roaming %COMMONPROGRAMFILES% C:\Program Files\Common Files %COMMONPROGRAMFILES(x86)% C:\Program...
Performance & Maintenance
Java, Windows 7 & Environment Variables
I have installed Java in Program Files (x86) > Java > jre > bin In Environment Variables, I accidentally deleted the default PATH variable. This is what I currently have in the PATH variable: Please can someone tell me what the default PATH was? I will add this in front of the Java path. ...
Software
Windows doesn't seem to keep my system environment variables
Hi all, As far as I can tell, my problem seems to be quite simple. The solution, however, may not be quite as simple. The application I am trying to make work is python 3. I also have python 2 installed, but that works fine. The problem is at the command prompt I would like to be able to...
Performance & Maintenance


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 14:17.
Twitter Facebook Google+