Windows 7 Environment variables

ahpitre

New member
Local time
4:18 PM
Messages
2
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 Computer

Computer Manufacturer/Model Number
HP
OS
Windows 7 Home Premium 64
CPU
Intel Dual-Core 2.1GHz
Motherboard
HP
Memory
4GB
Graphics Card(s)
Intel
Monitor(s) Displays
LCD 16"
Hard Drives
320GB SATA
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 Computer

Computer type
Laptop
Computer Manufacturer/Model Number
HP ENVY 17-1150eg
OS
Windows 10 Pro x64 EN-GB
CPU
1.6 GHz Intel Core i7-720QM Processor
Memory
6 GB
Graphics Card(s)
ATI Mobility Radeon HD 5850 Graphics
Sound Card
Beats sound system with integrated subwoofer
Monitor(s) Displays
17" laptop display, 22" LED and 32" Full HD TV through HDMI
Screen Resolution
1600*900 (1), 1920*1080 (2&3)
Hard Drives
Internal: 2 x 500 GB SATA Hard Disk Drive 7200 rpm
External: 2TB for backups, 3TB USB3 network drive for media
Cooling
As Envy runs a bit warm, I have it on a Cooler Master pad
Keyboard
Logitech diNovo Media Desktop Laser (bluetooth)
Mouse
Logitech Performance Mouse MX
Internet Speed
50/10 Mbps VDSL
Antivirus
Windows Defender 4.3.9431.0
Browser
Maxthon 3.5.2., IE11
Back
Top