Custom Script to copy files to a MAC, and move to another folder

Version 10

    Verified Product Versions

    LANDESK Management Suite 9.5LANDESK Management Suite 9.6

    Description

     

     

    This article will provide a couple of basic sample custom scripts that can be used to copy files to a MAC. These examples were used to copy some Template files to specific folders on a MAC.

     

    Resolution 


    1. Script to copy blank.pot template to the /Applications/Microsoft\ Office\ updated/Templates/Presentations/Designs folder.
    2. The BLANK.POT will need to be zipped to create a BLANK.POT.ZIP file on a MAC, and then copied from the MAC to the HTTP share where it be delivered from.
    3. The commands below will copy the zip file to the MAC, extract the zip file into the SDCACHE folder, and then move the blank.pot file from SDCACHE to the Designs folder in the path listed below.

      [MACHINES]
      REMEXEC0=ldkahuna http://Package Server/share/blank.pot.zip
      REMEXEC1=ldgidget /Library/Application\ Support/LANDesk/sdcache/blank.pot.zip
      REMEXEC2=mv /Library/Application\ Support/LANDesk/sdcache/blank.pot /Applications/Microsoft\ Office\ updated/Templates/Presentations/Designs


    1. Script to copy the NORMAL.DOT file to the logged in User’s /Documents/Microsoft\ User\ Data folder.
    2. The NORMAL.DOT will need to be zipped to create a NORMAL.DOT.ZIP file on a MAC, and then copied from the MAC to the HTTP share where it be delivered from.
    3. The commands below will copy the zip file to the MAC, extract the zip file into the SDCACHE folder, and then copy the normal.dot file from SDCACHE to the logged in users folder path listed below.

      [MACHINES]
      REMEXEC0=ldkahuna http://Package Server/share/normal.dot.zip
      REMEXEC1=ldgidget /Library/Application\ Support/LANDesk/sdcache/normal.dot.zip
      REMEXEC2=for dir in /Users/*; do cp /Library/Application\ Support/LANDesk/sdcache/blank.pot $dir/Documents/Microsoft\ User\ Data; done