Author Topic: DBF Attachment Scanner  (Read 29031 times)

0 Members and 1 Guest are viewing this topic.

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
DBF Attachment Scanner
« on: September 19, 2009 »
As you may well have heard, DBF was wiped off Hostpapa's servers at the end of August.  Our backup of the database was only a day old so we have been able to move hosts and restore all the users and posts after a lot of effort by Shockwave.

We did not, however, have a full backup of all the post attachments.  We have restored about 75% of the attachments, but there are hundreds of files still missing.

The attached program is designed to scan your hard disk for these missing attachments, after which it will zip them up.  This archive can then be uploaded to us and then I can add them to the attachment folder.  It should only take a few minutes to scan your drive, even if it is huge.

If attachments are found on your disks, please PM me, Jim, so I can arrange for you to upload the zip file.  Please do not upload the attachment zip files to public servers.

Your help is greatly appreciated!

EXE and Source (C#) attached.

Jim
« Last Edit: September 20, 2009 by Jim »
Challenge Trophies Won:

Offline benny!

  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4384
  • Karma: 228
  • in this place forever!
    • View Profile
    • bennyschuetz.com - mycroBlog
Re: DBF Attachment Scanner
« Reply #1 on: September 19, 2009 »
Awesome work, Jim. K++ !!! Very handy tool. Great idea that it zips them
up automatically!

Found 54 attachments. PM is on the way.
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

Offline benny!

  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4384
  • Karma: 228
  • in this place forever!
    • View Profile
    • bennyschuetz.com - mycroBlog
Re: DBF Attachment Scanner
« Reply #2 on: September 19, 2009 »
Hmm .. I did not see the PM I sent you in my outbox. Did it arrive ?

In addition - Is it possible to attach files to PMs ?
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: DBF Attachment Scanner
« Reply #3 on: September 19, 2009 »
Hi Benny,

I saw your PM.  Thanks!  If you want to keep a copy in your outbox then you need to check the box at the bottom saying 'keep a copy in my outbox' before you send it.

You can't attach stuff to PMs.  I will give you some FTP site details by PM for you to upload the files to.  Filezilla is a great tool to use.

Jim
Challenge Trophies Won:

Offline Moroboshisan

  • Senior Member
  • Amiga 1200
  • ********
  • Posts: 454
  • Karma: 18
  • C=64
    • View Profile
Re: DBF Attachment Scanner
« Reply #4 on: September 19, 2009 »
Hi Jim!

Great tool! It saved me a LOT (and I mean that!) of work...

found just 104 attachments, look for PM ;)

Offline Moroboshisan

  • Senior Member
  • Amiga 1200
  • ********
  • Posts: 454
  • Karma: 18
  • C=64
    • View Profile
Re: DBF Attachment Scanner
« Reply #5 on: September 19, 2009 »
did a 2nd run on the other HDD... found 4 more attachments.. I'll upload 2 separate files just renamed...

DBFAttachments_1stRun.zip   and   DBFAttachments_2ndRun.zip

waiting for info... ;)

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17407
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: DBF Attachment Scanner
« Reply #6 on: September 19, 2009 »
I found 140
K++ By the way
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Voltage

  • Professor
  • Pentium
  • *****
  • Posts: 857
  • Karma: 53
    • View Profile
Re: DBF Attachment Scanner
« Reply #7 on: September 19, 2009 »
karma++  :clap: 
Challenge Trophies Won:

Offline TinDragon

  • Pentium
  • *****
  • Posts: 644
  • Karma: 24
    • View Profile
    • J2K's blog
Re: DBF Attachment Scanner
« Reply #8 on: September 19, 2009 »
Nice job Jim, as I kind of expected it only found the files left in my upload directory which were the handful of attachments I already fixed. Seems my aggressive file cleaning works rather to well. But hopefully not everyone is as quick to clean there drives as me.

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2756
  • Karma: 493
    • View Profile
    • https://www.rbraz.com/
Re: DBF Attachment Scanner
« Reply #9 on: September 19, 2009 »
Nice program there Jim!

It's seems that my pc is a backup drive for DBF  ;D, I've found 273 archives :)

But sadly the program crashed at the end scanning!

Here is a log message:
Quote
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentException: The entry 'Attachments/RPG (attempt).zip' already exists in the zip archive.
   at Ionic.Zip.ZipFile.InsureUniqueEntry(ZipEntry ze1)
   at Ionic.Zip.ZipFile.AddFile(String fileName, String directoryPathInArchive)
   at Ionic.Zip.ZipFile.AddItem(String fileOrDirectoryName, String directoryPathInArchive)
   at dbfattscan.DBFAttScanView.ZipUp()
   at dbfattscan.DBFAttScanView.btnGo_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///D:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
dbfattscan
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///E:/Download/2009/DBFAttScan/DBFAttScan/dbfattscan.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///D:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///D:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///D:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///D:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///D:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
qe9klnxo
    Assembly Version: 1.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///D:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
Ionic.Zip.Reduced
    Assembly Version: 1.7.2.26
    Win32 Version: 1.7.2.26
    CodeBase: file:///E:/Download/2009/DBFAttScan/DBFAttScan/Ionic.Zip.Reduced.DLL
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: DBF Attachment Scanner
« Reply #10 on: September 19, 2009 »
Rats! It's supposed to spot the dupes and throw them out :(
I'll see what I can do.
Jim
Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17407
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: DBF Attachment Scanner
« Reply #11 on: September 19, 2009 »
Nice that you have all those archives Rbz :)
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: DBF Attachment Scanner
« Reply #12 on: September 19, 2009 »
Rbz,

Can you manually edit the AttachmentSummary.xml file and remove the 3 entries for 'RPG (attempt).zip' and then run the scan again.  I wasn't expecting that!

Jim
Challenge Trophies Won:

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2756
  • Karma: 493
    • View Profile
    • https://www.rbraz.com/
Re: DBF Attachment Scanner
« Reply #13 on: September 19, 2009 »
Jim, I've removed that but it crash at twistcrt.zip, twisterstrack.rar, YDT.zip and I don't know how much more files I need to remove, it could be thousands  ???
Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: DBF Attachment Scanner
« Reply #14 on: September 19, 2009 »
OK, I'll fix it tomorrow.  Thanks very much for trying.  These are attachments with the same name but attached to different posts.  You're right, there are potentially dozens of these and I don't do anything to separate them out.

Jim
Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: DBF Attachment Scanner
« Reply #15 on: September 20, 2009 »
Right, that's fixed, the new EXEs are attached to the first post.
Jim
Challenge Trophies Won:

Offline slinks

  • A little bit strange
  • DBF Aficionado
  • ******
  • Posts: 3961
  • Karma: 43
    • View Profile
Re: DBF Attachment Scanner
« Reply #16 on: September 20, 2009 »
OK, I'll fix it tomorrow.

I don't think anyone expected "tomorrow" to mean half 12 in the morning :D well done Jim, I'm downloading the scanner now
I love semi-colons way too much ^^;
Challenge Trophies Won:

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2756
  • Karma: 493
    • View Profile
    • https://www.rbraz.com/
Re: DBF Attachment Scanner
« Reply #17 on: September 20, 2009 »
I don't think anyone expected "tomorrow" to mean half 12 in the morning :D
It's tomorrow if you live in Australia  :P

@Jim, now it works fine here, 273 attachments found (29,1MB)  \o/
I'll send it tomorrow since I'm using a slow connection at home, but my brother have a fast one.

btw, inc [karma] :)



Challenge Trophies Won:

Offline slinks

  • A little bit strange
  • DBF Aficionado
  • ******
  • Posts: 3961
  • Karma: 43
    • View Profile
Re: DBF Attachment Scanner
« Reply #18 on: September 20, 2009 »
Nothing on this computer, but I'll scan my backup comp later. Pretty good tool though
I love semi-colons way too much ^^;
Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17407
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: DBF Attachment Scanner
« Reply #19 on: September 20, 2009 »
I'll scan my backup comp later.

Please do!
Shockwave ^ Codigos
Challenge Trophies Won: