Metawerx Java Hosting Small Logo

Metawerx BadFileCopier - Simple File Copy tool for files with CRC errors (Java-based) (OpenSource)

This is a free java command line application which can be used to copy a file from a damaged hard disk, CD or DVD.

If a CRC error occurs, a block of 64k is skipped and replaced with zeroes in the output file. This is ideal for copying video or sound data from a corrupted disk, where having 99% of the file is better than not being able to copy it at all.

The tool is completely free, and full source code is included.

Comments and improvements are welcome!

Download

  • See the Attachments section at the bottom of this page

Compatibility

  • Java JDK 1.4 and higher
  • Windows, Linux, BSD, Solaris and most other Java-enabled platforms

Instructions (Windows/Linux)

  • Download the class (and optional java source) files below, into a folder
  • Use the following command to run the tool, from the same folder you downloaded to:
java BadFileCopier <sourceFile> <destFileOrFolder>
  • Example for Windows
java BadFileCopier d:\some_bad_file c:\

Command Line Options

None

Additional Switches (add these at the end of the command line, after the filename)

None

How does it work

The tool is very simple, and just copies blocks of 64k from the source to destination using Java's RandomAccessFile class.

The advantage over the normal Windows copy or drag-drop method, is that when a CRC error occurs, the block can be skipped, replaced with zeroes, and the copy can continue.

The 64k block size can be modified easily in the source code. Future versions may specify this size on the command line.

Future Improvements / Suggestions

  • Provide usage help when no arguments are provided, or arguments are incorrect
  • Specify block size using a command-line argument

OpenSource - Improve this tool

  • You are welcome to make improvements to this tool, as long as you are happy with the copyright/terms below remaining the same.
  • Your name will be included in the revision notes, and you are welcome to add a page describing yourself or linking to your site if you do any work on the software.
  • To upload a new version, register on this wiki. Registration is free, and only a name, password and optional email address are required.
  • Upload the new version as a class file and new Java source, as an attachment to this wiki page, then add revision notes below.
  • Please use tabs for indenting

Copyright/Terms - By downloading the software, you agree to the following:

  • This software and source code is (c) Copyright Metawerx Pty Ltd, 2006.
  • This software and source code is provided free of charge and with absolutely no warranty
  • You may download and use this software for any purpose, as long as it is legal to do so in your country
  • Distribution, re-use, re-engineering and inclusion in or with any software product is permitted, provided that distributions of the source code, or inclusion of the source code in your product, retains the copyright notice and a link to this wiki page. Binary distributions carry no similar requirement.
  • Metawerx is not responsible for any damage of any sort associated with this software, or costs incurred through using it.

Change Log

  • 2007-Aug-03 - Neale Rudd - Initial Release

--Neale Rudd

Attachments

BadFileCopier.class Info on BadFileCopier.class 2323 bytes
BadFileCopier.java Info on BadFileCopier.java 2899 bytes
navigation
metawerx specific
search
Share
tools
help

referring pages
...nobody

Share