I wonder if there is a symbol that I should be using to make it more general

  • Thread starter Thread starter Frank
  • Start date Start date
F

Frank

I do the following:

Xcopy my.lnk "C:\Documents and Settings\All Users\Start
Menu\Programs\Games\"
Xcopy my.lnk "C:\Documents and Settings\All Users\Desktop\"

I wonder if there is a variable/symbol that I should be using to make it
more general ( like %programfiles% ) .


Thanks in advance
 
Frank said:
I do the following:

Xcopy my.lnk "C:\Documents and Settings\All Users\Start
Menu\Programs\Games\"
Xcopy my.lnk "C:\Documents and Settings\All Users\Desktop\"

I wonder if there is a variable/symbol that I should be using to make it
more general ( like %programfiles% ) .


Thanks in advance

The general answer is:
- Click Start / Run / cmd {OK}
- Type this command:
set | more
to see all available environmental variables.

You will now see that this command will do what you want:
xcopy /y my.lnk "%AllUsersProfile%\Desktop\"
 
Pegasus (MVP) said:
The general answer is:
- Click Start / Run / cmd {OK}
- Type this command:
set | more
to see all available environmental variables.

This is the best answer I could have received
You will now see that this command will do what you want:
xcopy /y my.lnk "%AllUsersProfile%\Desktop\"

I notice you put the option (/Y) before the file names while xcopy /? show
it after.
Guess xcopy is smart enough to handle it both ways.


Thanks a lot
 
I notice you put the option (/Y) before the file names while xcopy /? show
it after.
Guess xcopy is smart enough to handle it both ways.

With most (but not all!) commands it's a matter of preference.
Thanks a lot

You're welcome.
 

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

Back
Top