Tuesday, February 24, 2015

SCCM 2012 - Copy Files to User's Machine/Desktop

Sometimes you will need to just copy over files or folder contents to a folder on user's desktop:-
create a batch file:-
copy /y "%~dp0*.*" "%ProgramFiles%\Test\Temp"
which translates- copy all files to %ProgramFiles%\Test\Temp

In DP, place all the files needed in a folder, including the batch file.
Then create a package in SCCM, point commandline to run the batch file.
Deploy to user's machine, and it will copy all the folder contents to %ProgramFiles%\Test\Temp.

2 comments:

  1. Hi jake81,

    thank you very much for that. Can you explain how to copy these files to
    users desktop. You mentioned here to any folder.

    BR

    Daniel

    ReplyDelete
  2. Hi Daniel,
    If it's only for 1 specific user change "%ProgramFiles%\Test\Temp" to "c:\users\(put in username here)\Desktop"
    or if its for all users change "%ProgramFiles%\Test\Temp" to "%userprofile%\desktop"

    ReplyDelete