Computing.Net > Forums > Disk Operating System > Batch to Find the Desktop path

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Batch to Find the Desktop path

Reply to Message Icon

Name: Benze
Date: August 8, 2003 at 08:30:55 Pacific
OS: windows XP
CPU/Ram: P4 1.7GHz
Comment:

I want write a batch file to copy a shortcut to the desktop. But with all the windows OS out there and the networks, how can I find the path for the Desktop.

I tried with C:..\Desktop, but in only work if I run the batch file from the desktop.

HELLLLLLLLLLLLLLLLLLPPPPPPP!!!!!

Thanks



Sponsored Link
Ads by Google

Response Number 1
Name: whoeva
Date: August 8, 2003 at 16:48:19 Pacific
Reply:

@echo off
copy "location of shortcut" "C:\Documents and Settings\Owner\Desktop"


0

Response Number 2
Name: bitbyte
Date: August 9, 2003 at 09:52:53 Pacific
Reply:


---------------------
save following line to scopy.bat
@copy %USERPROFILE%\Desktop\%1 %2
thats all

example to copy shortcut cut1.lnk to c:\temp

scopy.bat cut1.lnk c:\temp



0

Response Number 3
Name: bitbyte
Date: August 9, 2003 at 10:00:04 Pacific
Reply:


oh sorry i read FROM THE DESKTOP but its TO THE DESKTOP

following is correct
@copy %1 %USERPROFILE%\Desktop\%2

save as scopy.bat

1st parameter is the file to copy, 2nd can be used to give it another name


0

Response Number 4
Name: wizard-fred
Date: August 9, 2003 at 21:04:18 Pacific
Reply:

This assumes that the Desktop is on the same drive as the install directory.

I frequently move by Desktop to another drive if I am using it to save to.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: Batch to Find the Desktop path

Find the letter given to the virtua www.computing.net/answers/dos/find-the-letter-given-to-the-virtua/11458.html

How do I find the CDROM www.computing.net/answers/dos/how-do-i-find-the-cdrom/10998.html

Dos registry path load (batch) www.computing.net/answers/dos/dos-registry-path-load-batch/15360.html