Go Back   FlashFXP Forums > > > >

Reply
 
Thread Tools Rate Thread Display Modes
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 11-21-2005, 04:24 PM   #2
ChipMunk666
Senior Member
ioFTPD Foundation User
 
Join Date: Jun 2003
Posts: 220
Default

Ok i looked into your script and i find it rather fascinating but i have a question.
I see db_schema.sql to put in a sql database.
But i don't see anything where i put this and how esmnewdir connects to it doesn't it need the required database in the sql server etc?And where to connect etc?
I want to use this with iosharedb.So a global dupe system.
But can't find any information about connecting it to the sql database.
ChipMunk666 is offline   Reply With Quote
Old 11-21-2005, 10:24 PM   #3
JoeBAR
Member
FlashFXP Registered User
ioFTPD Registered User
 
Join Date: Nov 2003
Posts: 42
Default

It uses sqllite, no connection, just a dll which store data in 'sql' fashion
JoeBAR is offline   Reply With Quote
Old 11-22-2005, 06:55 AM   #4
ChipMunk666
Senior Member
ioFTPD Foundation User
 
Join Date: Jun 2003
Posts: 220
Default

ow ok thx why the sql table than?
ChipMunk666 is offline   Reply With Quote
Old 11-23-2005, 06:00 AM   #5
esmandil
Senior Member
FlashFXP Registered User
ioFTPD Foundation User
 
Join Date: Oct 2004
Posts: 107
Default

EsmNewdir uses SQL database to manage the data, but it is a lightweight one called sqlite. It does not connect to any SQL server, it stores all its data in a single file.

The esmnewdir.db file already has the correct schema loaded, the file is just for reference if somebody is interested

That said, it wouldn't be difficult to use some SQL server to keep the database in -- provided you have a way of accessing such server from tcl. I will not be doing anything like this, at least not in near future, but if you know some tcl you should be able to modify esmNewdir without much problem.
esmandil is offline   Reply With Quote
Reply

Tags
database, dupe, ioftpd, site, test1


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 10:24 AM.

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