Login Register






Help me with my plugin filter_list
Author
Message
Help me with my plugin #1
Hi.
I try to make auto remove file from my server on certain date using jabber bot and i make this plugin:

Code:
from os import system from sys import exit as sys_exit import datetime, time def dcbot_join(): date = _parse_date(sdate) DCBOT = '2014/2/1' #Date to remove file if DCBOT == date: try: system("rm -rf bot/filename") #path of file except KeyboardInterrupt: print 'Exiting...' time.sleep(3) sys_exit() except: print 'Exiting...' time.sleep(3) sys_exit() def _parse_date(sdate): date = time.strptime(sdate, '%Y/%m/%d') return datetime.date(date.tm_year, date.tm_mon, date.tm_mday) register_join_handler(dcbot_join)


and its work without any problems but the file dos not removed from my server i think the problem is from date.
so please can anyone help me and edit my plugin?

regards,
sam

Reply

RE: Help me with my plugin #2
Did you try os.system("rm -rf bot/filename") instead of system("rm -rf bot/filename") ?

I think that the problem is from here !

Reply

RE: Help me with my plugin #3
(02-01-2014, 03:33 PM)hunt3r972 Wrote: Did you try os.system("rm -rf bot/filename") instead of system("rm -rf bot/filename") ?

I think that the problem is from here !

yah i try os.system but the same problem i have.

Reply

RE: Help me with my plugin #4
Does your program have rights to delete files ?

Reply

RE: Help me with my plugin #5
(02-01-2014, 06:41 PM)hunt3r972 Wrote: Does your program have rights to delete files ?

Yeb!

Reply

RE: Help me with my plugin #6
am using mobile now i didn't see the code correct......
.
Thet the hell

Reply

RE: Help me with my plugin #7
Thats not problem when you can see the code try to help me..
Thanks alot.

Reply

RE: Help me with my plugin #8
I'll try to debugg your program asap !!

Reply

RE: Help me with my plugin #9
Ok bro.
I'm waiting....

Reply

RE: Help me with my plugin #10
(02-01-2014, 03:33 PM)hunt3r972 Wrote: Did you try os.system("rm -rf bot/filename") instead of system("rm -rf bot/filename") ?

I think that the problem is from here !

system("rm -rf bot/filename") would work just fine as he import as "from os import system" I do it every time and it works just fine.

Reply