Topic RSS
4:31 pm
Hi,
Id like to be able to delete a file – or even folder – on reciept of an email, guess i can only achieve that with javascript, but using various stock bits of code about i cannot get it to work.
Is this feasable?
Im trying to get a template to reply with a freshly downloaded file as attachment, but cannot as it pulls the previous one from the local temp folder, hence why i want to delete it as part of the filter action.
Thanks.
2:13 am
Well the script i have used is this:
myActiveXObject = new ActiveXObject("Scripting.FileSystemObject");
file = myActiveXObject.GetFile("c:\\whateverfile.txt");
file.Delete();
Do you have any suggestions how to get this to work? Or do you mean maybe that sending the command outside of TB is the tricky bit?
No problem if its hassle, a batch could do the job no prob, i just thought javasript might be a more elegant way of achieving it.
Thank you
I don't have any experience with the "ActiveXObject". Using Mozilla components, this script will delete a file in a javascript action:
let file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsILocalFile);
file.initWithPath("c:\\temp\\test-ml-7.eml");
if (file.exists()) file.remove(false);
rkent
Most Users Ever Online: 18
Currently Online:
9 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Member Stats:
Guest Posters: 130
Members: 565
Moderators: 1
Admins: 1
Forum Stats:
Groups: 1
Forums: 7
Topics: 231
Posts: 802
Newest Members: Matteo, p.dobrogost, gaute, Mythobeast, terry, Livraria Notre Dame
Moderators: rkent (323)
Administrators: rkent (323)
Log In
Register
Members
Home
Add Reply
Add Topic
Quote
Offline

Recent Comments