[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Poco Forums • View topic - Script to delete attachments

Script to delete attachments

Scripting questions and ideas

Moderators: Eric, Tomas, robin, Michael

Script to delete attachments

Postby cssutto » Tue Mar 07, 2006 2:27 am

The POCO Script will not work on my Barca2.

When it asks for confirmation, it shows the proper attachment in the window, the correct path, etc., but then when I press "proceed", it continues to the end but leaves the attachment in the attachment file.

I would like to get this working, if anyone knows how.

CSSJR

Code: Select all
{ *** Read the attached files *** }
ReadAttached $AttachedFiles %message
LineCount #vNoOfFiles $AttachedFiles
if #vNoOfFiles = 0 then End


{ *** Loop through all files *** }
Set #vRowNo 0
Set #vDeletedFiles 0
:Remove
   GetLine $AttachmentName #vRowNo $AttachedFiles

   { *** Show confirmation *** }
   Set $Message ""
   AddStrings $Message "Delete attachment " $AttachmentName " %var%"
   InputBox $a $Message "No|Yes"

   if $a ! "Yes" then Proceed
      DeleteAttached %message $AttachmentName
      Inc #vDeletedFiles
   :Proceed

   Inc #vRowNo
if #vRowNo < #vNoOfFiles then Remove

{ *** If necessary, save updated message to mailbox *** }
if #vDeletedFiles = 0 then End
   AppendToFile True
   SaveMessage %message $currentmailbox
   DeleteMessage %message
:End




~ Moved to PocoScript + added Code tags ... Eric ~
cssutto
 

Postby Eric » Tue Mar 07, 2006 3:58 am

Do have a look at Attachment Remover too. :wink:
Eric
 


Return to PocoScript Help and How-To

Who is online

Users browsing this forum: No registered users and 1 guest

cron