Incremental File Comparisons

Is this possible in Java, I was thinking of reading the into a a buffer and comparing each bit... then setting them if they are different ?
I know its a little off topic but I want to use it as part of a distributed backup system. And I have noticed that by the most coherent responses come from this forum ;)
Any code bits would be useful or any links to tutorials or guides would be very much appreciated
Regards
Luke

Although not on topic it will come in handy when I write up my research :) Because I need to look at CRC as well :-) But i was under the impression that java had some built in class that dealt with CRC... but maybe I am wrong...
Well on the topic of filesystems and checksums and the like...
Does anyone know if is possible to create a filesystem in java? I am guessing that its not, I have read a few articles suggesting its possible to mount a virtual filesystem but the problem with that is that it can still be seen by the native filesystem.i.e from Windows, or linux.
Regards..

Similar Messages

  • My Script Saves My Files In Incremental file names but can't save to original folder?

    hi everyone,
    so after a few hours of browsing the forum, was able to scotch tape this script together so it allows me to save my files in incremental file numbers.
    - i create an action to edit the file and then in that action, i run this script x-amount of times.
    - it works as i tested it a few times.
    but here are my questions that i can't figure out.
    1. right now it says to a folder that i have to designated. how would i edit this code so it'll save in the same folder as the file i am editing?
    2. so far it saves as a jpeg. does anyone know the syntax to use for a gif?
    and if you're kind enough...let's say i have an animated gif file, i can't edit it in photoshop so i have to use imageready but how do i replicate the above in imageready since we're on the same topic.
    THANKS!!! code is below:
    // This script will save the active document to a folder with an incremental sufix
    // Change the options below to match your needs
    var saveFolder = new Folder( 'C:\\test' );
    var saveExt = 'jpg';
    var saveSufixStart = '_';
    var saveSufixLength = 3;
    jpgSaveOptions = new JPEGSaveOptions();
    jpgSaveOptions.embedColorProfile = true;
    jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
    jpgSaveOptions.matte = MatteType.NONE;
    jpgSaveOptions.quality = 8;
    // End of user options
    //==========================================
    function zeroPad ( num, digit ){
       var tmp = num.toString();
       while (tmp.length < digit) { tmp = "0" + tmp;}
       return tmp;
    var docName = decodeURI ( activeDocument.name );
    docName = docName.match( /(.*)(\.[^\.]+)/ ) ? docName = docName.match( /(.*)(\.[^\.]+)/ ) : docName = [ docName, docName, undefined ];
    var saveName = docName[ 1 ]; // activeDocument name with out ext
    var files = saveFolder.getFiles( saveName + '*.' + saveExt );// get an array of files matching doc name prefix
    var saveNumber = files.length + 1;
    //alert("New file number: " + zeroPad( saveNumber, saveSufixLength ));
    var saveFile = new File( saveFolder + '/' + saveName + '_' + zeroPad( saveNumber, saveSufixLength ) + '.' + saveExt );
    activeDocument.saveAs( saveFile, jpgSaveOptions ,true ,Extension.LOWERCASE);

    ImageReady? Which version of Photoshop do you use?
    1. right now it says to a folder that i have to designated. how would i edit this code so it'll save in the same folder as the file i am editing?
    You need to amend the line
    var saveFolder = new Folder( 'C:\\test' );
    accordingly.
    2. so far it saves as a jpeg. does anyone know the syntax to use for a gif?
    There are examples on the Forum, for example
    http://forums.adobe.com/message/3928843#3928843

  • Labview IMAQ VI for capturing images and saving with incremental file names

    Hello,
    I am using LabView 7.1(IMAQ) to capture images with NI's PCI 1426 card, and a JAI CV-M2 camera. Now, with the example VI's like LL Grab, or LL Sequence, or Snap and Save to File.vi, I can capture the images. But what I actually want is to capture images continuously and keep saving them with a sequentially incrementing file name.
    I have tried to modify the Snap and Save to File.vi  by adding a 'for loop', so as to run this for required number of images. This works okay, but I can't really change the file name after every image. However, I'm not confident with this method either. I think it would be better to use the buffer itself, as is given in LL Grab.vi and somehow save images from the buffer. I think this would be faster ?
    In any case, any ideas as to how I should go about implementing auto-incrementing of the file name ?
    Any help will do. 
    Thanks.
    - Prashant

    Hi,
    Thanks a lot for replying. 
    I tried using this in the VI i was working with, but using the "build path" vi doesnt seem to work. If I use just the base path from user's input, it works, but then again it keeps overwriting the images into one file rather than giving each file a new name. I'm attaching the vi. 
    Please take a look and tell me where i'm going wrong.
    Thanks again.
    Attachments:
    LL Sequence_mod.vi ‏62 KB

  • Do integrity checks by file comparison really work?

    Hello,
    I use a program (Beyond Compare) which has a Folder Compare module, with a function for doing a binary comparison between the files inside two folders. I use it to check the integrity of my backups, by comparing my main hard disk files, with the ones on
    the backup hard disks. If two files get recognized as being different, then one of them should be corrupt (if they didn't get modified "normally").
    My question is: will this method work to detect real file corruptions? Will it detect any kind of corruption, both copy corruptions, and "bit rot" corruptions? Will there be no problem regarding read cache? I mean: if the first file to compare gets read
    from disk, and is kept in a read cache (by Windows or by the hard disk, or by something else), will the second file get read from the same cache (if Windows or the hard disk think they are identical files)? Do Windows and hard disks have some kind of procedure
    to detect if a file to read from disk is already available in cache, even if it is in a different folder than the "original" one? Perhaps some kind of file-checksum-system which decides that the files are same? (And this system would not notice if the file
    to compare is corrupt). If this would be true, then integrity checks by file comparison would not work, because in practice the same file would be read twice (first from disk, and then from cache), instead of reading both the two files to be compared from
    disk.
    I have already done tests by manually "corrupting" files (changing slightly the contents, while keeping size and timestamp the same), and it works (the files get recognized as different). But I'm not sure if it will work also with "real" corrupt files.
    I'm interested mostly about Windows 8 Pro 64bit and NTFS (but would like to know also in general).
    Thanks.

    I also have Beyond Compare and have used it to check backup data.
    Yes, Windows does RAM caching.  If you have a comparison program read enough file data that you
    can be sure the RAM cache is flushed, then you can be sure that reading the file data back and comparing it with the original data is a valid way to ensure you have uncorrupted backups.
    Note that NTFS now does online recovery, so just the act of reading back the data can trigger processes inside the file system implementation that will recover the data if it should start to experience "bit rot" (weakening or failure of the
    storage medium).  But this is not strictly necessary as other operations, such as defragmentation etc., will occasionally access the disk data as well.
    Some time back I wrote a small utility that calculates a CRC-32 on all the data from all the files in a set of folders.  This is another way that re-reading all the data can be triggered, as well as producing a summary number that can be easily
    compared to determine that all is well - though one doesn't need my software to do it...  There are hash programs available that can accomplish the same things.  Search for SHA-1 programs, but beware there can be malware associated with free programs
    and download sites.
    It's good that people think about data integrity.  There's all too little of that nowadays.
    -Noel
    Detailed how-to in my eBooks:  
    Configure The Windows 7 "To Work" Options
    Configure The Windows 8 "To Work" Options

  • File comparison tool for Windows 8.1?

    I'm looking for a file comparison tool. I'm on Windows 8.1 Pro (Upgrade). There was a program called Windiff. Is it still available, and functional for Win 8.1? If so, where do I get it? If not, or if there's anything better, what should I use? Thanks
    in advance for any help.

    Hi,
    It's ok to use fc command:
    >fc /?
    Compares two files or sets of files and displays the differences between
    them
    FC [/A] [/C] [/L] [/LBn] [/N] [/OFF[LINE]] [/T] [/U] [/W] [/nnnn]
       [drive1:][path1]filename1 [drive2:][path2]filename2
    FC /B [drive1:][path1]filename1 [drive2:][path2]filename2
      /A         Displays only first and last lines for each set of differences.
      /B         Performs a binary comparison.
      /C         Disregards the case of letters.
      /L         Compares files as ASCII text.
      /LBn       Sets the maximum consecutive mismatches to the specified
                 number of lines.
      /N         Displays the line numbers on an ASCII comparison.
      /OFF[LINE] Do not skip files with offline attribute set.
      /T         Does not expand tabs to spaces.
      /U         Compare files as UNICODE text files.
      /W         Compresses white space (tabs and spaces) for comparison.
      /nnnn      Specifies the number of consecutive lines that must match
                 after a mismatch.
      [drive1:][path1]filename1
                 Specifies the first file or set of files to compare.
      [drive2:][path2]filename2
                 Specifies the second file or set of files to compare.
    Kate Li
    TechNet Community Support

  • File comparison utility for OS X

    In Dreamweaver CS6 on Mac OS X Lion, what file comparison utility should I use and what is the path to it (for the Preferences setting? I have TextWrangler installed via the App Store, but selecting that does nothing. There is supposed to be a twdiff command line program installed but it can't be found on my Mac.

    delaneypub wrote:
    In Dreamweaver CS6 on Mac OS X Lion, what file comparison utility should I use and what is the path to it (for the Preferences setting? I have TextWrangler installed via the App Store, but selecting that does nothing. There is supposed to be a twdiff command line program installed but it can't be found on my Mac.
    What do you need it for?  As I understand it, you no longer need it.
    <http://www.reedolsen.com/mac-os-x-file-comparison-software-no-longer-needed/>
    Please tell us what exactly you are trying to do so that a better approach can be given.
    Good luck.

  • Script File comparison

    Hi,
    When I am using FileMerge and compare two different versions of a script file, it says "Files are not ASCII", if I 'proceed anyway' I am seeing lots of special characters.
    How can I do a better file comparison(.scpt)?
    regards
    Mowri

    Here's a very basic script that will accomplish what you're asking:
    <pre style="width:630px;height:auto;overflow-x:auto;overflow-y:hidden;"
    title="Copy this code and paste it into your Script Editor application.">set tmpDir to do shell script "mktemp -d /tmp/CompareScripts.XXXXXXXXX"
    set leftFile to tmpDir & "/left"
    set rightFile to tmpDir & "/right"
    set script1 to quoted form of POSIX path of (choose file)
    set script2 to quoted form of POSIX path of (choose file)
    do shell script "osadecompile " & script1 & ">" & leftFile & ¬
    ";osadecompile " & script2 & ">" & rightFile & ¬
    ";/Developer/Applications/Utilities/FileMerge.app/Contents/MacOS/FileMerge -left " & ¬
    leftFile & " -right " & rightFile & ";rm -rd " & tmpDir</pre>
    This script is very basic and has no error checking incorporated. Here's what the script does when run:
    1) Creates a uniquely named directory in the "/tmp" directory.
    2) Asks you to locate script file #1 (left file for FileMerge comparison).
    3) Asks you to locate script file #2 (right file for FileMerge comparison).
    4) Launches FileMerge and loads the 2 files for comparison.
    5) Deletes the directory it created in the beginning when you quit FileMerge.
    The script will continue to run until you quit FileMerge. The script can be modified in many different ways depending on the exact task you'd like for it to achieve. You can also modify the script to be a droplet so you can just drop 2 scripts on it for comparison.
    Hope this at least gets you started in the right direction.

  • Good file comparison app for mac

    I've been using Dreamweaver for years but have never set up an app for file comparison. I don't even know where to start or what to look for. Any suggestions?

    I chose DifMerge. It is great and very fast. Registration is now half price. Tried FileMerge, also nice but xcode has a lot more overhead on my MacBook Pro R. There are versions for Windows and Linux

  • File comparison for RoboHelp?

    Is there a way to do a file comparison for RoboHelp projects?
    I've read in the online help that you can do a file comparison if
    you're using version control software, which we're not. Our
    reviewers would like a way to see what has changed between
    versions.
    Thanks.

    I have always been impatient with editors and reviewers who
    insist on changes being flagged. In my view, this is the lazy
    person's way of doing a half-hearted job. They don't want to look
    at anything but the changes. I wouldn't handle my contributors that
    way; why let reviewers off the hook?
    The underlying assumption is the material was at least
    correct, if not perfect, before changes and doesn't warrant a
    second look. A foolish assumption. Additionally, this approach will
    fail to spot contradictions and inconsistencies between new
    material and earlier text that wasn't revised.
    Yet I can and will suggest a tool, one I would never use for
    editorial review, that pinpoints with dead-on accuracy any
    differences between files.
    It's useful for controlling the publishing process and for
    checking back on what RH has published between versions.
    An inexpensive application available on the Web is Beyond
    Compare. It will let you set up side-by side (or above-and-below)
    comparisons with options for various degrees of control, such as
    file revision level, date/time stamps, file size and so on. You can
    flag files that differ by checksum or as little as a binary value.
    You can open a mismatched pair and review differences line by line.
    You can even suppress the display of files and lines with no
    changes.
    That's my rant for today. Good luck.
    Harvey

  • File comparison program

    Can anyone recommend a good file comparison program?
    Thanks
    Vic

    Thanks! I'm now playing with Beyond Compare
    A.Translator wrote:
    > Joe Makowiec schreef op 14/11/2008 :
    >>> Can anyone recommend a good file comparison
    program?
    >
    >> Windows has its own built-in 'fc' utility. If you
    don't like that, get a
    >> copy of the GNU utilities ports for Windows[1] and
    use 'diff'
    >
    >>
    http://gnuwin32.sourceforge.net/
    >>
    http://unxutils.sourceforge.net/
    >
    > Or WinMerge (free) from
    http://winmerge.org/
    > or Beyond Compare from
    http://www.scootersoftware.com/
    >

  • Indesign File comparison tool

    Hello, is there any tool available for indesign files that makes a precise comparison between two indesign documents?  I need this for making sure of corrections made in documents i have.  Idealy it would work as a search function and enable the comparison of two different documents and highight any changes made between the two.  Thanks very much--c

    Doesn't this approach only focus on errors?
    I am not familiar with Preflight, but when I run it I only get errors.
    I struggle with the same comparison issue. I need highly detailed comparisons.
    When I try this in Acrobat Pro comparing the PDF outputs of two different InDesign files, it pretty much marks the entire document as changed.
    I end up using a 3rd party tool (Araxis Merge) and doing a binary file comparison, then trying to figure out where in the INDD file the changes are.
    Cheers.

  • File comparison and merge tool

    could you please tell me a nice (free if possible!) file comparison tool for the mac.
    I currently use Beyond Compare (http://www.scootersoftware.com/) or WinMerge (http://winmerge.org/) on XP
    thanks in advance
      Mac OS X (10.4.8)  

    You could get out your original DVD that came with your computer and install the developer tools that Apple provides.
    Once installed, you can open /Developer/Applications/Utilities/FileCompare.app
    This is free and useful.
    If you cant find your original DVD you can get if from developer.apple.com

  • PDF file comparison setting

    Hello I am using Acrobat PRO XI on 30days demonstration program.
    Now I want to compare PDF files without text ornament (Fonts style, Bold, italic and etc ...) .
    Microsoft word 2010 can control a comparison without text ornament, but document style is broken layout if there is tables and pictures including text.
    If there are some good solution, I will buy Acrobat soon. if no, it may be postponed ...
    My environment
    Windows7
    Acrobat PRO XI
    Thanks in advance for your cooperation.

    Do this in the Initial View tab of the PDF's Document properties.
    Be well...

  • Increment file number

    The problem statement:  Create a test application that saves the test report with a filename that increments each time the test is run.
    Example:
    VR-1524-NXX-XXXXXXXX-June 17, 2011 - 100015
    VR-1524-NXX-XXXXXXXX-June 17, 2011 - 100016
    VR-1524-NXX-XXXXXXXX-June 17, 2011 - 100017
    The next time the application is opened and the product is tested, the number needs to increment to 100018.
    Aside from creating a txt file that contains the increment number, what is the best practices method for solving this issue?
    -Regards
    eximo
    UofL Bioengineering M.S.
    Neuronetrix
    "I had rather be right than be president" -Henry Clay

    Here is how I would do the name part. From here you just need to save the name in the text file and make it so it can open it.
    Tim
    Johnson Controls
    Holland Michigan
    Attachments:
    SAVE VI.vi ‏9 KB

  • Security file comparison

    Dear All,
    Our security file crashed and we used the backup copy to recover it. The date of the backup copy shows it is the one on the prior day. Which I don't think there will be much defference, and we reviewed the log and can find no security changed during the day.
    But our management team asks us to compare the two files and report the difference...
    Do you have any good idea to compare the 2 files?

    Well, your comparison is always going to be off, isn't it? One file is good, the other corrupt -- they have to be different, don't they?
    I would be extra sure to have a backup of the .bak file before I did any of this as Essbase has a tendency to write a copy of Essbase.bak on start up and it would be a shame to overwrite your last good copy.
    If the original file will still let you start Essbase up (usually this isn't the case, but you might get lucky), you can dump the contents of the Essbase.sec in three ways:
    1) Start Essbase in a window, and issue the DUMP command -- that will write the information out to a text file.
    2) I think you can do this from EAS, but for the life of me can't remember how -- right click on the security node and select export? I don't have EAS in front of me.
    3) Use MaxL's export security_file command.
    One other thing to consider -- if you use externalized to Shared Services security, most of your security is there, not in Essbase.sec, so you might want to think about comparing what was in Shared Services versus what is there today.
    Regards,
    Cameron Lackpour

Maybe you are looking for

  • Is there a way to remove an imperfection from the video images?

    I have a 2 minute clip. My subject is sitting in front of a poster. Is there a way to mask one line of text on the poster throughout the clip?

  • How can I detect when a hibernate mode accures during my program?

    hello everyone I 'm trying to find some way to let my program know the moment when the user tries to get the computer into hibernate mode ? is this possible in any way under java?

  • MX4000-T128 Should I use a fan?

    Hello, Currently using a MX4000-T128 (heatsink only-no fan) and am pleased with the results.  However, upon playing a game or two (ex. Comanche4) for an hour plus, the heatsink was too hot to touch.  While I don't have the most expensive card, I do w

  • Testing Cache Refresh

    I'm having a problem when creating a test business service with which to test the cache refresh (INTEGRATION_DIRECTORY_HMI).  After creating the business service "test", I activate the change list and I get the following error. Unexpected error durin

  • Adobe Premiere Pro CS6 - Audio issues

    Hello everyone, First of all I would like to apologize for my pretty weak english. I've been using Premiere CS6 for a while and I've never encountered any major issue that couldn't be fix... until now. I'm working on a project that has several audio