jssrecording 3 Posted September 23, 2016 Report Share Posted September 23, 2016 (edited) Okay UBot nation! I have an email that get's sent with attachment via smtp. After the email is sent I need to delete the attachment file from directory. When I use the delete file node it Window error's saying file is in use. Which yes it is in use because it sent the email. Here is that section of my code below. Thanks, Jason wait(5)shell("C:\\Users\\jssrecording\\Downloads\\makecsvnodup.bat")wait(5)connect to mail server("SMTP With SSL","cpcsvdigest@gmail.com","Deep_Space1","smtp.gmail.com",587) { send email("email1@gmail.com,email2@gmail.com","testing","Plain Text","boom","..\\Downloads\\completehome.csv","","")}wait(8)shell("C:\\Users\\jssrecording\\Downloads\\csvcleanfilesup.bat")wait(8)delete file("C:\\Users\\jssrecording\\Downloads\\completehome.csv") Edited September 23, 2016 by jssrecording Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted September 23, 2016 Report Share Posted September 23, 2016 HI, You prolly need to close the connection to the file. Not sure how to do it from command line. Hope that helps, NIck Quote Link to post Share on other sites
jssrecording 3 Posted September 27, 2016 Author Report Share Posted September 27, 2016 HI, You prolly need to close the connection to the file. Not sure how to do it from command line. Hope that helps, NIckHey Nick I made a work around. I had one bot run the other bot and finish the delete of the file after it closed the second bot. ThanksJason Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.