rendered paste bodyimport java.io.File;import java.io.FileInputStream;import java.io.FileNotFoundException;import java.io.IOException;import java.security.MessageDigest;import java.util.Formatter;public class MD5Checksum { public static void main(String[] args) { MD5Checksum md5checksum = new MD5Checksum(); File file = new File("."); md5checksum.runthrough(file); } public void runthrough(File file) { File[] filesInDir = file.listFiles(); for(int i=0; i<filesInDir.length; i++) { byte[] data = new byte[1088]; File currentFile = filesInDir[i]; if (currentFile.isFile()) { try { (new FileInputStream(currentFile)).read(data); String md5check = getMD5Hash(data); System.out.println(currentFile.getAbsolutePath()+" : "+md5check); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } else runthrough(currentFile); } } public String getMD5Hash(byte[] datei) { StringBuffer result = new StringBuffer(32); try { MessageDigest md5 = MessageDigest.getInstance("MD5"); md5.update(datei); Formatter f = new Formatter(result); for (byte b : md5.digest()) { f.format("%02x", b); } } catch (Exception ex) { ex.printStackTrace(); } return result.toString(); } }