How to copy files to a specific directory on client machines via a bat file through Software Distribution


    Verified Product Versions

    LANDESK Management Suite 9.5

    Description

     

     

    If you want to copy file(s) to a client machine using LDMS, you might see these errors:

     

    • Batch file fails to copy file

     

    If you want to update file(s) on a client:

     

    • Error: Access Denied copying file

     

     

     

    Resolution

     

     

    These are two possible solutions using batch files with a Software Distribution task.


    I. Create a batch file distribution package that has the files to be copied as additional files listed in the package.

     

      1. Create a batch file distribution package in the LDMS Console
      2. Copy the files to be copied to the same directory that the batch file is stored in.
      3. Add the files to be copied as additional files in the properties of the distribution package.
      4. In your script, set the batch file to copy the files from the sdmcache directory to the destination directory.

     

    The syntax to use in the batch file would be:

     

    xcopy file.exe "c:\program files\my program\file.ext"

     

    Since the files to be copied will be downloaded to the same directory as the batch file in the sdmcache folder, a path to the files is not necessary.

     

    NOTE: This is the preferred option for using a batch file to copy files.

     

     

     

    II. Use a batch file distribution package, have the batch file copy the files from a network location to the destination directory.

     

    The syntax to use in the batch file would be:

     

    xcopy \\network share\file.exe "c:\program files\my program\file.ext"

     

    This option can be problematic. It might be necessary to map a drive to the share in the script. Also, since LANDESK is using the Local System account to run the batch file the Active Directory group "Domain Computers" must be listed in the share permissions.