Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting a .lnk file onto the desktop via a batch file

Status
Not open for further replies.

meBrian

Programmer
Aug 7, 2001
73
US
I'm attempting to use a batch file to copy files off network drives to local PCs (Multi-platform enviro). I want to add a shortcut to the Desktop of these PCs. For the Win2000 machines I keep getting an error - Syntax is incorrect - for this command. Here's the line:

COPY i:\Database\CIIS\CIS-2002.lnk C:\Documents and Settings\All Users\DESKTOP

The source path works, and can be placed in other local dir., so it has to be the destination path that's broke.
Looks like it should work. Any ideas or reasons why it won't work.

TIA
Brian
 
And yes, I've tried using c:\Document~1\etc.

I get a path not found error.
 
I know that you have found a solution to your problem but for those who are still looking for an answer. Here is a possible solution:
1. Copy the shortcut into a new folder
2. Copy the contents of the folder to where you want to place the shortcut.

Hope that helps.

Firm.
 
Here is how I do it.

echo f|xcopy "c:\program files\ibm\client access\emulator\private\bus400.lnk" "c:\documents and settings\%username%\desktop\bus400.lnk"

Kevin Mattson
MCP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top