Jump to content
UBot Underground

Delete File After Emailed Attachment


Recommended Posts

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 by jssrecording
Link to post
Share on other sites

HI,

 

You prolly need to close the connection to the file. Not sure how to do it from command line.

 

Hope  that helps,

 

NIck

Hey 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.

 

Thanks

Jason

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.

Loading...
×
×
  • Create New...