2 Replies Latest reply on Jun 7, 2016 12:38 PM by LSattan

    trouble with file transfer script

    dynamozappa Apprentice

      Hello,

       

      I am having a problem with distributing two small files with a simple file transfer script. I have created a script to distribute two files to a managed device using LD Management Suite 9.6. Here is the script:

       

      [JOBPARAM]

      STEPS=1

      [MACHINES]

      REMEXEC0=<qt/>%LDMS_CLIENT_DIR%\pedownloader.exe<qt/> /f /p="<OURLANDESKSERVER\file1" /dest="C:\Program Files\Common Files\...\file1" /lan=90 /wan=60

      REMEXEC1=<qt/>%LDMS_CLIENT_DIR%\pedownloader.exe<qt/> /f /p="<OURLANDESKSERVER\file2" /dest="C:\Program Files\Common Files\...\file2" /lan=90 /wan=60

       

       

      As you can see i have edited the script for the client to use pedownloader.exe instead of SDClient.exe as suggested in this article:

       

      How to make file transfer script work on LDMS 9.6 core server or later version

       

      It is funny because both methods reported that they were successful (see screenshot) in transferring the files in the Console. And i was logged into the computer i was trying to distribute the files to at the time and i could see SDClient.exe running but the files were not copied.

       

      FileTransfer.jpg

       

      This was the first file transfer script i created on our new LD server with 9.6 and i was very much hoping it would work.

       

      Anyone have any ideas why it would report the job "successful?"

       

      thanks.

        • 1. Re: trouble with file transfer script
          Tanner Lindsay SupportEmployee

          You would need to look at the CJ-<JobName> log on the Core Server. When running Custom Scripts, basically any positive value is considered success, while negative values are failure. This actually stems from HRESULT value in Windows. Return values from applications are represented by an HRESULT - 32 bit binary number. Normally, when there is an error, the first bit is set to 1, making the result a negative decimal value.

           

          As to the actual task at hand, I would actually recommend you just create a software distribution task. This type of thing (and others) is part of why Custom Scripts are "legacy". You can create a simple batch file to copy files to the destination that you need, then just add those files as additional files. When the package is downloaded, the batch file and necessary files will be in the same folder inside SDMCache. You actually don't even care what the folder is. You batch file can be very simple:

           

          copy file1 C:\Destination1\file1
          

           

          This is just a simple example, but it can work very effectively.

           

          If you want to be even fancier, you could create a batch file (or other script/application) that could copy everything in the same folder with itself (except itself) to a destination directory that you specified on the command-line in the SWD package, if this is something you do a lot.

          • 2. Re: trouble with file transfer script
            LSattan Apprentice

            I just found this today and am experiencing the same problem, apparently it doesn't work....why these features are available for us to use and have them not work is very frustrating. I could just create a batch file like tanner suggests but im kinda tired of putting workarounds in place for their product, if it doesn't work then they should take it out.