Old 12-14-2004, 09:38 AM   #1
esmandil
Senior Member
FlashFXP Registered User
ioFTPD Foundation User
 
Join Date: Oct 2004
Posts: 107
Default esmNewdir

http://www.ioftpd.com/scripts/script.php?id=166
Excerpts for ReadMe.txt:

##################################################
This is a newdir/dupe script for ioFTPD, created by Esmandil
version 0.35 (11.12.2004)

It uses sqlite database, so it is pretty fast: I have tested with
database of over 1.000.000 directories and it still took less than 0.5
seconds to MKD. On the other hand, the dupe db takes a bit more (about
50% more, probably) space than flat text file would. It is well worth
it, though

This script was heavily influenced by NEWDIR V3.5.2 by B0unTy
-- big thanks, B0unty!

##################################################

Usage:

site new [<section>] [<count>] [<pattern>]
site dupe <pattern> [<section>] [<count>]
site undupe <dirname>

Deleting a directory removes it from the dupe database.
Wipe-ing a directory keeps it in dupe database.

##################################################

Example of use:

PHP Code:
MKD test1
257 
"test1" created.

MKD test1
550 This dir looks like a dupe
!

site undupe test1
200
-Successfully unduped test1

site 
new D*V 3 tes
200
-##  Age       Owner       Section     Name         
200---  --------  ----------  ----------  -------------
200-01  01d 04h   ioFTPD      DVDR        test1        
200
-02  03d 00h   ioFTPD      DiVX        test2        
200
-03  03d 00h   ioFTPD      DiVX        test3        
200
-Usagesite new [<section>] [<count>] [<pattern>]

site dupe test gam 3
200
-## Age       Owner       Section     Name                
200--- --------  ----------  ----------  ------------------- 
200-01 00m 02s   ioFTPD      game        test7               
200
-02 02m 15s   ioFTPD      game        test8               
200
-          NotesWiped by ioFTPD on 2004-12-10 20:30:07,
200-03 01d 04h   ioFTPD      games_old   test9               
200
-          NotesUnduped by ioFTPD on 2004-12-10 20:38:04 
200
-Usagesite dupe <pattern> [<section>] [<count>] 
##################################################

!!! ATTENTION: batch script(s) I use -- namely run.bat -- have only
!!! been tested on WinXP. I am pretty sure they will work on 2000 as
!!! well, but most probably won't in 9x. If somebody manages to write
!!! it in a portable way, I would love to get my hands on it

##################################################

Have fun
esmandil is offline   Reply With Quote
Old 03-02-2005, 07:07 AM   #2
CoLt-[45]
Member
FlashFXP Registered User
ioFTPD Foundation User
 
Join Date: May 2003
Posts: 32
Default

Sound nice script, is there's a way I can use FILE instead of DIR ?

Dupe Filename is important to me :/

Thanks
CoLt-[45] is offline   Reply With Quote
Old 03-03-2005, 09:01 AM   #3
esmandil
Senior Member
FlashFXP Registered User
ioFTPD Foundation User
 
Join Date: Oct 2004
Posts: 107
Default

I never tried

But simply changing

[Events]
OnNewDir = %EXEC ..\scripts\esmNewdir\run.bat OnNewDir %[$user]

into

[FTP_Pre-Command_Events]
stor = %EXEC ..\scripts\esmNewdir\run.bat OnNewDir %[$user]

might work... or maybe not, depending if ioftpd gives the same parameters to "OnNewDir" and to "stor".
esmandil is offline   Reply With Quote
Old 03-03-2005, 11:19 AM   #4
mr_F_2
Senior Member
 
Join Date: Jan 2004
Posts: 203
Default

Quote:
Originally posted by esmandil
I never tried

But simply changing

[Events]
OnNewDir = %EXEC ..\scripts\esmNewdir\run.bat OnNewDir %[$user]

into

[FTP_Pre-Command_Events]
stor = %EXEC ..\scripts\esmNewdir\run.bat OnNewDir %[$user]

might work... or maybe not, depending if ioftpd gives the same parameters to "OnNewDir" and to "stor".
well why don't you test it next time?
this is the output:

150 Opening BINARY mode data connection for 00-a_perfect_circle-thirteenth_step-covers-2003-ube.jpg.
argc=3
Param 0 = ..\scripts\checkscript.exe
Param 1 = STOR
Param 2 = 00-a_perfect_circle-thirteenth_step-covers-2003-ube.jpg


not sure if it matches your script

//mr_F
mr_F_2 is offline   Reply With Quote
Old 03-04-2005, 06:43 PM   #5
esmandil
Senior Member
FlashFXP Registered User
ioFTPD Foundation User
 
Join Date: Oct 2004
Posts: 107
Default

Quote:
well why don't you test it next time?
Why should I? ;-) As the name says, it is newDIR script, not newFILE script... using it as dupe filename is not supported.

As I said, it shouldn't be difficult to make it work. But I do not intend to do it.

Quote:
this is the output:
Thanks.

Quote:
not sure if it matches your script
well why don't you test it next time?

# usage: sh.exe OnNewDir.sh <createdBy> <realPath> <fullDirPath>

So no, it does not match my script expectations. But it can be made compatible with some clever usage of cookies.
esmandil is offline   Reply With Quote
Old 03-04-2005, 06:49 PM   #6
mr_F_2
Senior Member
 
Join Date: Jan 2004
Posts: 203
Default

Quote:
Originally posted by esmandil

well why don't you test it next time?
lol.
i did my part :P
mr_F_2 is offline   Reply With Quote
Old 05-05-2005, 03:45 PM   #7
esmandil
Senior Member
FlashFXP Registered User
ioFTPD Foundation User
 
Join Date: Oct 2004
Posts: 107
Default

OK, new version uploaded.

Rewritten as TCL script, so it should be easier to install -- and maybe slightly faster as well.

Not many things changed:
+ added file dupe check (I don't use it myself, so it's mostly untested)
+ added option to purge database
esmandil is offline   Reply With Quote
Old 05-05-2005, 03:57 PM   #8
CoLt-[45]
Member
FlashFXP Registered User
ioFTPD Foundation User
 
Join Date: May 2003
Posts: 32
Default

Heh, nice one.. will test that later tonight

Will mention here if I find any bug(s) (wish I hope not )
CoLt-[45] is offline   Reply With Quote
Old 05-05-2005, 04:10 PM   #9
esmandil
Senior Member
FlashFXP Registered User
ioFTPD Foundation User
 
Join Date: Oct 2004
Posts: 107
Default

Sure. I have tested it a bit, so it should at least appear to work.

But I honestly never could understand what people use file dupe for...

Anyway, I will hopefully be able to fix any bugs you find
esmandil is offline   Reply With Quote
Old 05-07-2005, 10:36 AM   #10
CoLt-[45]
Member
FlashFXP Registered User
ioFTPD Foundation User
 
Join Date: May 2003
Posts: 32
Wink

[R] site undupe
[R] 200-Usage: "site undupe <user> <dirname>"


Can undupe a dirname.. but what's the command to undupe a filename?

Maybe a small fix? or am I missing something here?

Would like to have something like "site undupe <filename>" as I don't see the point to have "site undupe <user> <filename>"

BTW, script is pretty straight forward, easy to install - glad with it so far but haven't reaches to 50,000th files yet (will do it right after i've got this small fix)

Quote:
!!! ATTENTION: batch script(s) I use -- namely run.bat -- have only
!!! been tested on WinXP. I am pretty sure they will work on 2000 as
!!! well, but most probably won't in 9x. If somebody manages to write
!!! it in a portable way, I would love to get my hands on it

You've mentioned a batch file, maybe you could tell me where to find it? - or have it send to me so that I can add all those 50,000+ files to the db without having to upload it all over again
Hope you can help

TIA
CoLt-[45] is offline   Reply With Quote
Old 05-07-2005, 03:01 PM   #11
esmandil
Senior Member
FlashFXP Registered User
ioFTPD Foundation User
 
Join Date: Oct 2004
Posts: 107
Default

Quote:
Can undupe a dirname.. but what's the command to undupe a filename?
"site fileundupe <filename>" should work...

Quote:
as I don't see the point to have "site undupe <user> <filename>"
The "user" part is filled automatically by ioFTPD... even if isn't really all that useful Sorry it isn't clear from the documentation.

Quote:
You've mentioned a batch file, maybe you could tell me where to find it?
Are you sure you have an up-to-date version of my script? The bat file is no more -- it was only used before I had TCL script.

And no, I have no way of adding files to the db. I may code something like this, but no promises.
esmandil is offline   Reply With Quote
Old 05-08-2005, 07:59 AM   #12
jeza
Senior Member
ioFTPD Scripter
 
jeza's Avatar
 
Join Date: May 2003
Posts: 530
Default

Code:
######################################################################

There are a couple of things I am thinking about adding... Would you
find any of them useful?

* nuked/unnuked to db (how should it work?)
* pre (what support does pre need?)

site dupe test gam 3
200-## Age       Owner       Section     Name                
200--- --------  ----------  ----------  ------------------- 
200-01 00m 02s   ioFTPD      game        test7               
200-02 02m 15s   ioFTPD      game        test8               
200-          Notes: Wiped by ioFTPD on 2004-12-10 20:30:07,
200-03 01d 04h   ioFTPD      games_old   test9               
200-          Notes: Unduped by ioFTPD on 2004-12-10 20:38:04 
200-04 01d 04h   ioFTPD      games_old   test9               
200-          Notes: Nuked 3x by ioFTPD on 2004-12-10 20:38:04 because reason
200-04 01d 04h   ioFTPD      games_old   test9               
200-          Notes: UnNuked by ioFTPD on 2004-12-10 20:38:04 because reason
200-Usage: site dupe <pattern> [<section>] [<count>]

pre :
select type of pre :
site pre rls type
site pre type rls

nuke = %TCL ..\scripts\esmNewdir\esmNewdir.itcl SiteNuke
unnuke = %TCL ..\scripts\esmNewdir\esmNewdir.itcl SiteunNuke
pre = %TCL ..\scripts\esmNewdir\esmNewdir.itcl SitePre
jeza is offline   Reply With Quote
Old 06-05-2005, 05:26 PM   #13
esmandil
Senior Member
FlashFXP Registered User
ioFTPD Foundation User
 
Join Date: Oct 2004
Posts: 107
Default

New version (0.60) released.

Changelog:

0.60 -- minor upgrade
+ newer version of tclsqlite3.dll included, be sure to replace!
+ storing nuke/unnuke messages in database
+ pre support added
+ dupe can now report results by private message
esmandil is offline   Reply With Quote
Old 06-09-2005, 08:52 AM   #14
esmandil
Senior Member
FlashFXP Registered User
ioFTPD Foundation User
 
Join Date: Oct 2004
Posts: 107
Default

0.65 -- minor upgrade
+ "site fileundupe" now reports number of unduped files
+ rewritten ReadMe.txt so those too lazy to read it whole will now only install directory dupe, not file dupe
+ Customisable column widths
+ !new can now report results by private message too
+ An option to exclude some files from dupe database
+ "site esmNewdir Import" command added to import existing dirnames (be careful, it is pretty limited)
+ Fixed problem with "[]" characters in dirnames
esmandil is offline   Reply With Quote
Old 06-10-2005, 06:49 PM   #15
mentality
Junior Member
 
Join Date: May 2005
Posts: 14
Default

try setting 'ioerror' 0


tahts, return '0'
mentality is offline   Reply With Quote
Reply

Tags
database, dupe, ioftpd, site, test1

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 06:53 PM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)