Old 11-07-2012, 09:44 PM   #31
Yil
Too much time...
FlashFXP Beta Tester
ioFTPD Administrator
 
Join Date: May 2005
Posts: 1,194
Default

Approved the attachment which I think is necessary for jeza to download it...
Yil is offline   Reply With Quote
Old 11-08-2012, 02:38 PM   #32
jeza
Senior Member
ioFTPD Scripter
 
jeza's Avatar
 
Join Date: May 2003
Posts: 530
Default

new version available : 4.6.50.615 (Fixed IMDB exception)

For upgrade just replace jeza.ioFTPD.Framework.dll
jeza is offline   Reply With Quote
Old 11-09-2012, 01:24 PM   #33
Quarzar
Junior Member
 
Join Date: Oct 2009
Posts: 4
Default

It's working now.

But i had some suggestions...

Integrate an option which enable or disable the creation of .jeza.ioFTPD.Debug, because i can't delete folders over the ftp client. It's recreate the folder and add a .jeza.ioFTPD.Debug.

After the IMDB info the script could write some infos to the .ioFTPD.Message file like that example

Code:
|----------=[ Movie Info        ]=-----------------------------------------------------------|
| Title....: Terminator 2: Judgment Day                                                      |
| Rating...: 8.6                                                                             |
| Votes....: 388,227                                                                         |
| Year.....: 1991                                                                            |
| Genre....: Action, Sci-Fi, Thriller                                                        |
|----------=[ User Stats        ]=-----------------------------------------------------------|
|          1. Test                       4MB  42760kBit/s    1F                              |
|----------=[ Group Stats       ]=-----------------------------------------------------------|
|          1. test                       4MB  42760kBit/s    1F                              |
'---------------------------------------------------------------------=[   1/1   ]=----------'
Write the content of diz files to the .ioFTPD.Message

Code:
|----------=[ User Stats        ]=-----------------------------------------------------------|
|                                                                                            |
|----------=[ Group Stats       ]=-----------------------------------------------------------|
|                                                                                            |
'---------------------------------------------------------------------=[   x/x   ]=----------'
content from file_id.diz
Quarzar is offline   Reply With Quote
Old 11-12-2012, 03:29 PM   #34
jeza
Senior Member
ioFTPD Scripter
 
jeza's Avatar
 
Join Date: May 2003
Posts: 530
Default

New Version : 4.6.50.621 - See first post for download
Upgrade only for ZipScript (added iMDB iNFO and diz to .ioFTPD.Message file)
If you wanna disable DEBUG file, just use "" in 'FileNameDebug' config setting.
Example
Code:
<add key="FileNameDebug" value="" />
Upgrade
Code:
In jeza.ioFTPD.ZsipScript.exe.config add
    <add key="AddDizToMessageFile" value="false"/> <!-- Add the .diz content to .ioFTPD.Message file -->
    <add key="AddImdbInfoToMessageFile" value="false"/> <!-- Add the iMDB iNFO content to .ioFTPD.Message file -->

    <add key="MessageImdbInfoHead" value="|----------=[ Movie Info        ]=-----------------------------------------------------------|" />
    <add key="MessageImdbInfo" value="| Title....: {5,-80:B79}|{22}| Rating...: {16,-80:B79}|{22}| Votes....: {17,-80:B79}|{22}| Year.....: {6,-80:B79}|{22}| Genre....: {9,-80:B79}|{22}| Runtime..: {15,-80:B79}|" />
    
Replace all *.dll and *.exe files in 'jeza.ioFTPD.ZipScript'
jeza is offline   Reply With Quote
Old 11-29-2012, 06:05 PM   #35
xy0thep
Junior Member
 
Join Date: Nov 2012
Posts: 8
Exclamation your ArchiveScript: some questions

hi there,

first of all i need to say that im only using your archive script (latest version). concerning that i got some questions:

1.) i set up the xml-file like the following:

Code:
<?xml version="1.0" encoding="utf-8"?>
<tasks xmlns="http://jeza.ioFTPD.Tools/XMLSchema.xsd">
  <task>
    <logFormat>ARCHIVE: &quot;Archive&quot; &quot;Moving {0} from {1} to {2}&quot;</logFormat>
    <status>Enabled</status>
    <actionType>Move</actionType>
    <source>C:\\FTPD\\TEST</source>
    <sourceVirtual>/TEST/</sourceVirtual>
    <destination>X:\\INCOMING</destination>
    <destinationVirtual>/ARCHIVES/INCOMING/</destinationVirtual>
    <action id="TotalFreeSpace">
      <value>4000000000</value>
      <minFolderAction>1</minFolderAction>
    </action>
  </task>
</tasks>
question is: when selected move as "action type" isnt the source supposed to be deleted (automatically, after successful move)?
it worked so far. when hdd-space dropped below ~4GB the oldest stuff was moved to defined destination dir, but the source dir kept the stuff aswell and didnt delete it.

2. what is that "logFormat" about? is it for internal logging (see my third question aswell)?
i'd like to have an output to my ioftpd.log file for being able to use that output on dzsbot to annouce moved dirs on irc. is that possible?

3. from config file:
Code:
    <add key="FileNameInternalLog" value="c:\\ioFTPD\\logs\\jeza.ioFTPD.log" />
whats that about? i couldnt find a file named like that on the logs dir. is it supposed to be the location of the "normal" ioftpd.log? (see question 2)

4. concerning updates of a dupe database:
any chance to support nxtools' db? i tried the following setting, but i got an error:

Code:
   <add key="UpdateDupe" value="true"/>
    <add key="DataSourceDupe" value="Data Source=c:\\ioFTPD\\scripts\\nxTools\\data\\DupeDirs.db"/>
    <add key="DataSourceDupeUpdateCommand" value="UPDATE Folders SET PathReal = '{1}', PathVirtual = '{2}' WHERE ReleaseName = '{0}'"/>
error:

Code:
[23:14:54] [R] 200-[2012-11-29 23:14:52] Updating DUPEDB with 'UPDATE Folders SET PathReal = '{1}', PathVirtual = '{2}' WHERE ReleaseName = '{0}''
[23:14:54] [R] 200-[2012-11-29 23:14:52] DUPEDB : 'Data Source=c:\\ioFTPD\\scripts\\nxTools\\data\\DupeDirs.db'
[23:14:54] [R] 200-[2012-11-29 23:14:52] releaseName='RELEASE', realPath='C:\FTPD\TEST\RELEASE', virtualPath='/ARCHIVES/INCOMING//RELEASE'
[23:14:54] [R] 200-[2012-11-29 23:14:52] ExecuteNonQuery: 'UPDATE Folders SET PathReal = 'C:\FTPD\TEST\RELEASE', PathVirtual = '/ARCHIVES/INCOMING//RELEASE' WHERE ReleaseName = 'RELEASE'
[23:14:54] [R] 200-[2012-11-29 23:14:54] System.Data.SQLite.SQLiteException (0x80004005): SQLite error
[23:14:54] [R] 200-no such table: Folders
[23:14:54] [R] 200-   bei System.Data.SQLite.SQLite3.Prepare(SQLiteConnection cnn, String strSql, SQLiteStatement previous, UInt32 timeoutMS, String& strRemain)
[23:14:54] [R] 200-   bei System.Data.SQLite.SQLiteCommand.BuildNextCommand()
[23:14:54] [R] 200-   bei System.Data.SQLite.SQLiteDataReader.NextResult()
[23:14:54] [R] 200-   bei System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)
[23:14:54] [R] 200-   bei System.Data.SQLite.SQLiteCommand.ExecuteNonQuery()
[23:14:54] [R] 200-   bei jeza.ioFTPD.Framework.DataBase.ExecuteNonQuery(String commandText)
[23:14:54] [R] 200-   bei jeza.ioFTPD.Framework.ConsoleAppTasks.UpdateDupeDb(ArchiveTask archiveTask, DirectoryInfo directoryInfo)
[23:14:54] [R] 200-   bei jeza.ioFTPD.Framework.ConsoleAppTasks.ExecuteArchiveTask(ArchiveTask archiveTask, DirectoryInfo directoryInfo)
[23:14:54] [R] 200-   bei jeza.ioFTPD.Framework.ConsoleAppTasks.ExecuteArchiveTask(ArchiveTask archiveTask, List`1 sourceFolders)
[23:14:54] [R] 200-   bei jeza.ioFTPD.Framework.ConsoleAppTasks.ManageDiskSpace(ArchiveTask task, List`1 sourceFolders)
[23:14:54] [R] 200-   bei jeza.ioFTPD.Framework.ConsoleAppTasks.ExecuteArchiveTasks()
[23:14:54] [R] 200-   bei jeza.ioFTPD.Framework.ConsoleAppTasks.Execute(TaskType taskType)
[23:14:54] [R] 200-   bei jeza.ioFTPD.Archive.Program.Main()
[23:14:54] [R] 200 Command successful.
guess the error is that nxtools' db has other sql tables?? maybe someone knows what to adjust to make it fit to nxtools db?

guess it has to be set here, but i dunno what.

Code:
   <add key="UpdateDupe" value="true"/>
    <add key="DataSourceDupe" value="Data Source=c:\\ioFTPD\\scripts\\nxTools\\data\\DupeDirs.db"/>
    <add key="DataSourceDupeUpdateCommand" value="UPDATE Folders SET PathReal = '{1}', PathVirtual = '{2}' WHERE ReleaseName = '{0}'"/>
thx for replies in advance!
xy0thep is offline   Reply With Quote
Old 12-02-2012, 01:25 AM   #36
jeza
Senior Member
ioFTPD Scripter
 
jeza's Avatar
 
Join Date: May 2003
Posts: 530
Default

It seems that all your problems come from UPDATE dupe command.
  1. ActionType=MOVE
    Script teeps are : COPY to destination, update dupe if enabled and finally delete source.
    The script failed on step 2 (update dupe) and thats why the third step (DELETE source) was never reached
  2. logFormat
    This setting is used to write to ioFTPD.log or internal log file. it was not logged, because the script exited on update dupe.
    Example :
    PHP Code:
    <logFormat>ARCHIVE: &quot;Archive&quot; &quot;Moving {0from {1to {2}&quot;</logFormat
    will write a line into ioFTPD.log : 2012-12-02 12 23:23 ARCHIVE: "archive" "Moving blablabla from /sadfsd/sdfsd/ to /fsfsdfsf/"
  3. FileNameInternalLog
    when xml configuration has logFormat node it will allways log to ioFTPD.log, and also to 'FileNameInternalLog' if specified in .config.
    this is only if someone wanna have a second log file (additional to default ioFTPD.log) and/or the irc bot reads anounce lines from that file...
  4. update dupe db
    sorry i don't know the correct update command for nxdupe, but if you get it, you can change it in 'DataSourceDupeUpdateCommand'

for now just disable update dupe and everything should start working again.
PHP Code:
<add key="UpdateDupe" value="false"/> 

Last edited by jeza; 12-02-2012 at 01:32 AM.
jeza is offline   Reply With Quote
Old 12-02-2012, 02:45 AM   #37
xy0thep
Junior Member
 
Join Date: Nov 2012
Posts: 8
Default

thx for ur reply.

im gonna test w/o that dupe update just to see if it works (dupedb update is essential for me concerning archiving).

about the log-format again: is this independant from the move function or didnt it log anything here because like u said its the update failure?

will report back when i'm done testing

concerning the nx update ill report back aswell. i took a look into the sql structure and tables of the nx .db files and i think its easy to get an adjusted dupe update command done.
xy0thep is offline   Reply With Quote
Old 12-03-2012, 04:49 AM   #38
jeza
Senior Member
ioFTPD Scripter
 
jeza's Avatar
 
Join Date: May 2003
Posts: 530
Default

now it did not log anything because of the failure with update dupe.
for the next release i will change that, so the script will not exit on dupe failure...
jeza is offline   Reply With Quote
Old 12-03-2012, 08:13 AM   #39
xy0thep
Junior Member
 
Join Date: Nov 2012
Posts: 8
Default

hi,

it was like u told me. all errors where caused of the dupe db update. now it works like a charm.

neat script, great work, appreciated!

for the nxtools db i nearly got it to work aswell. will take a deeper look next days and report back.
xy0thep is offline   Reply With Quote
Old 01-31-2013, 07:26 AM   #40
biggysmlz
Junior Member
 
Join Date: Dec 2012
Posts: 15
Default

Hi, I am using this script to archive stuff and its pretty great, but i face one issue, while the site archive command works without issues at all, whenever i have the script in the scheduler, in the debug log i can see it always fails with this error:

Code:
Archive...
[2013-01-31 13:00:21] Assembly.GetExecutingAssembly().Location: ['z:\path\ioFTPD\scripts\jeza.ioFTPD.ArchiveScript\jeza.ioFTPD.Framework.dll']
[2013-01-31 13:00:21] System.Runtime.InteropServices.COMException (0x80090006): Invalid Signature. (Exception from HRESULT: 0x80090006)
   at System.StubHelpers.InterfaceMarshaler.ConvertToManaged(IntPtr pUnk, IntPtr itfMT, IntPtr classMT, Int32 flags)
   at Microsoft.Win32.Win32Native.CreateAssemblyNameObject(IAssemblyName& ppEnum, String szAssemblyName, UInt32 dwFlags, IntPtr pvReserved)
   at Microsoft.Win32.Fusion.ReadCache(ArrayList alAssems, String name, UInt32 nFlag)
   at System.Reflection.RuntimeAssembly.EnumerateCache(AssemblyName partialName)
   at System.Reflection.RuntimeAssembly.LoadWithPartialNameInternal(AssemblyName an, Evidence securityEvidence, StackCrawlMark& stackMark)
   at System.Reflection.Assembly.LoadWithPartialName(String partialName, Evidence securityEvidence)
   at System.Xml.Serialization.TempAssembly.LoadGeneratedAssembly(Type type, String defaultNamespace, XmlSerializerImplementation& contract)
   at System.Xml.Serialization.XmlSerializer..ctor(Type type, String defaultNamespace)
   at jeza.ioFTPD.Framework.Extensions.Deserialize[T](T xmlObject, String fileName, String defaultNamespace)
   at jeza.ioFTPD.Framework.ConsoleAppTasks.ParseConfig()
   at jeza.ioFTPD.Archive.Program.Main()
Any idea why? When i run it via site cmd "site archive" it works fine..
biggysmlz is offline   Reply With Quote
Old 02-01-2013, 12:32 AM   #41
jeza
Senior Member
ioFTPD Scripter
 
jeza's Avatar
 
Join Date: May 2003
Posts: 530
Default

To be honest, i have no idea.
maybe Yil can help?
jeza is offline   Reply With Quote
Old 02-01-2013, 07:04 AM   #42
biggysmlz
Junior Member
 
Join Date: Dec 2012
Posts: 15
Default

Ive worked around this by adding the run of this task to windows task scheduler, seems to wokr fine, i have another question tho, is there a way to make archiver add logs to ioFTPD log file, so the activity gets announced by a sitebot?
biggysmlz is offline   Reply With Quote
Old 02-03-2013, 06:44 AM   #43
jeza
Senior Member
ioFTPD Scripter
 
jeza's Avatar
 
Join Date: May 2003
Posts: 530
Default

you can add 'logFormat' node to every task configuration.
like this example:
Code:
<task>
    <logFormat>ARCHIVE: &quot;Archive&quot; &quot;Moving {0} from {1} to {2}&quot;</logFormat>
    <status>Enabled</status>
    <actionType>Move</actionType>
    <source>E:\\temp\\TestFiles</source>
    <sourceVirtual>/temp/TestFiles/</sourceVirtual>
    <destination>E:\\temp\\archive</destination>
    <destinationVirtual>/archive/</destinationVirtual>
    <action id="TotalFolderUsedSpace">
      <value>12345000</value>
      <minFolderAction>2</minFolderAction>
    </action>
  </task>
this would write something like this into ioFTPD.log
datetime ARCHIVE: "Archive" "Moving blabla from asda to ttt"
jeza is offline   Reply With Quote
Old 02-03-2013, 07:58 AM   #44
biggysmlz
Junior Member
 
Join Date: Dec 2012
Posts: 15
Default

thanks a lot worked


actually... do I have to specify ioFTPD.log files path in the configs?

Last edited by biggysmlz; 02-03-2013 at 11:05 AM.
biggysmlz is offline   Reply With Quote
Old 02-03-2013, 12:14 PM   #45
jeza
Senior Member
ioFTPD Scripter
 
jeza's Avatar
 
Join Date: May 2003
Posts: 530
Default

no, you don't need to specify the ioFTPD.log file location.
jeza is offline   Reply With Quote
Reply

Tags
jeza, manager, releases, script, zip

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 02:36 PM.

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