Jump to content
troms

Email a Uploaded File

Recommended Posts

Has anyone come across a way to run a script that generates a file, that file then gets uploaded to the labtech server, and then labtech attaches that file to a email and sends it to a specific email account,

 

the first part of that is easy but I have found no way to tell labtech to look at this file path grab this file and email it to this address, as basically trying to automate the sending of a AD export to csv to a 3rd party

Share this post


Link to post
Share on other sites

The File Upload step creates an internal variable named "%uploadedfile%". Just use that as the attachment path in the "Email" script function step.

Share this post


Link to post
Share on other sites

ok update to this, once the file is upload and then emailed is there a way to script a delete of that file off the labtech server, i tried using the %uploadedfile%  variable with the file delete and it seems to list the path but says it can't find the file to delete it,

 

Parameters: C:\LTShare\Uploads\client\server\AU.csv
Output: ERR an error occurred: Could not find a part of the path C:\LTShare\Uploads\client\server\AU.csv

or perhaps i should be using a command other then file delete to accomplish this.

any help is greatly appreciated.

Edited by troms

Share this post


Link to post
Share on other sites

@troms I tried getting the same exact thing to work before and gave up.
Needless to say at least yours is getting some traction and hopefully a working script! 

 

Share this post


Link to post
Share on other sites

yeah I tried for awhile not much success i finally just setup a scheduled task on the server to purge the files in the uploads directory once a week

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...