Batch File

J

Jasper Recto

I would like to create a batch file that will copy a file to every users
desktop.

What command do I use to denote the current users profile?

\\Document and settings\CURRENT USER???\Desktop

Any ideas?

Thanks,
Jasper
 
P

Pegasus [MVP]

Jasper Recto said:
I would like to create a batch file that will copy a file to every users
desktop.

What command do I use to denote the current users profile?

\\Document and settings\CURRENT USER???\Desktop

Any ideas?

Thanks,
Jasper

When you type
set{Enter}
at the Command Prompt then the variable %UserProfile% will immediately stick
out.
 
V

vanessa

If you want to copy a file for every users but don't want it to be duplicated
you want to copy it to C:\Documents and Settings\All Users\Desktop
adjust the path as you need.
 
J

ju.c

System Folder Variables:

%HomeDrive% - C:\
%SystemDrive% - C:\
%AllUsersProfile% - C:\Documents and Settings\All Users\
%HomePath% - C:\Documents and Settings\{username}\
%UserProfile% - C:\Documents and Settings\{username}\
%AppData% - C:\Documents and Settings\{username}\Application Data\
%TEMP% and %TMP% - C:\DOCUME~1\{username}\LOCALS~1\Temp\
%ProgramFiles% - C:\Program Files\
%CommonProgramFiles% - C:\Program Files\Common Files\
%SystemRoot% - C:\Windows\
%WinDir% - C:\Windows\
%CD% - \Current directory\


ju.c
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top