troms 0 Posted January 18 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
DarrenWhite99 313 Posted January 21 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
troms 0 Posted February 5 (edited) 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 February 5 by troms Share this post Link to post Share on other sites
Dave M 0 Posted February 6 @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
troms 0 Posted February 6 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
Dave M 0 Posted February 6 I think that would be problematic because I believe there is a link to it in the database. Share this post Link to post Share on other sites