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 Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
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
What are Environment Variables in Computer?
Hey, Can anyone explain are environment variables are within the Advanced System Settings of Computer? I've had to create a new environment variable for a Java complier, and I was just wondering what exactly are environment variables are and why are they used? Thanks, Harry P.S I've...
General Discussion
accidentally deleted path in environment variables
i was editing the path in environment variables after installing jdk-6.0 when i accidentally deleted it...is there a way to recover it? or if not , can somebody tell me what was the default variable path was that? i'm using windows 7 starter...and a toshiba laptop.....please i really need help...
System Security
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 19:30.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App