So I have an Online KScript that does everything I want it to except for Upload a file. The script zips a folder of logs from another program and uploads it so I can review them later. The Zip file is only about 3.5MB. 

However, when I run the script, it always fails and never uploads the file. This is the only line I get about the upload in the log: 

"Uploading file: /Library/Application\ Support/Dell/KACE/data/kbots_cache/packages/kbots/239"

As you can see, it looks like it's adding a space between the folder and the filename for some reason. I've tried adding a "/" to the end of the directory, but it just does "239/," still with a space. I've put the filename in with the directory and left the filename part blank, but it still failed. 

Does anyone know how to get an Online KScript to upload a file from a Mac? Alternatly, do you know how to get an Online Shell Script to upload a file to the K1000 server? Or anywhere else? 

Answer Summary:
1 Comment   [ + ] Show Comment


  • Hello, Did you ever figure this out? I'm having the same issue.

    • This was from about 3 years ago, so I don't really remember, and we're running the latest version of kbox now, so I don't think it has the same issue, that I remember. However, looking at what I wrote again, I'd say that if your path has spaces in it (like /Library/Application Support), do NOT escape the space when typing it in the field in the online kscript builder - that seemed wrong to me, but it works, I'm pretty sure. I know I have also used the option that someone suggested in the comments of uploading to the clientdrop smb share, and that works, but requires a full shell script to really get it done.
Please log in to comment



I'm not immediately aware of a way to upload a file to the K1000 like this.  I don't believe it's possible (or at least easy).  To my knowledge, you would have to upload the clientdrop folder (\\yourk1000\clientdrop) and to do that you would have to provide samba credentials.

Depending on what's in the logs you might be able to create a custom inventory rule to read file, although it probably would have to be unzipped.

Something like this:  ShellCommandTextReturn(cat /path/to/file.txt)

Answered 02/22/2013 by: jknox
Red Belt

  • I've used the Upload a file feature before on Windows and it's worked without issue. It uploads to the "Uploaded files" section of the computer in Inventory. Here's a screenshot of the function:
    However, I cannot get it to work with Mac. It seems like it's having some problem with Syntax.

    I'll try uploading it to the client drop in a shell script, but I wonder if there's an answer to why this will work with windows and not Mac? or if I'm doing something differently.
    • Wow, I didn't know that feature even existed. I'd suggest enabling debug, running the script and then opening a support ticket with the debug logs.

      Mac commands for enabling debug on 5.3/5.4 agent are:

      1. To automatically set debug through a script:

      Scripting>K1000 Agent Debug Log Enable (Mac/Linux)

      Add the machine(s) you want to enable debug on to;Limit Deployment To Listed Machines; and click Run Now.

      2. How to manually set debug:
      a. Open Terminal by going to ‘Applications>Utilities.
      b. Execute: sudo /Library/Application\ Support/Dell/KACE/bin/AMPTools debug=true

      Send all of the .log and .conf files from Library/Application\ Support/Dell/KACE/data
  • Thanks for the suggestion! I'll give that a try when I get time. For the time being I took your other idea and uploaded it to the clientdrop via mount_smbfs in a shell script
Please log in to comment

If its adding a space, (which Im not sure why it would but I cant see the end of the path in your screenshot) Hav eyou ried escaping the path with /? Even if this works Id still open a support ticket it adress the syntax bug but it may provide a workaround. 

Answered 02/24/2013 by: jdornan
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity
Admin Script Editor
Admin Script Editor is an integrated scripting environment available free here at ITNinja