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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I batch copy a file from a drive to a desktop?

Status
Not open for further replies.

Spyder757

Technical User
Aug 29, 2002
129
US
At my job all of the workstations are running Windows 2000. I would like to be able to write a simple batch file to copy and paste a database to the desk top of the users.

Example:

Copy Database.mdb C:\Documents and Settings\JJohnson\DesktopDatabase.mdb

The problem I run into is each person’s desktop directory is different because each login generates a different subdirectory. In the above example the user would be JJohnson however Amy Davis would be Amy Davis.

Any ideas?
 
You will need to copy it to:
C:\Documents and Settings\All Users\Desktop\Database.mdb

As simple as that.

Marc
If 'something' 'somewhere' gives 'some' error, expect random guesses or no replies at all. Please specify details.
Free Tip: The F1 Key does NOT destroy your PC!
 
Wow that is so easy I dunno why i didn't think of it. Thanks.
 
If you want to put it into the user's individual desktop, create a batch file with this line:

Copy Database.mdb "%USERPROFILE%\Desktop\Database.mdb"


And if you want the all users folder:

Copy Database.mdb "%ALLUSERSPROFILE%\Desktop\Database.mdb"


I have a logon script that recreates a needed shortcut if it is accidentally deleted using this method.

D
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top