1.

Solve : Duplicate file Content?

Answer»

hi friend,

How can we read the content of copied file and compare with the content of files in destination FOLDER (where we are going to paste)?

example:

My purpose is to when we copy and paste multiple times of with  samefile name(e.g 1.txt) it is pasted as  copy of (1).txt,copy of (2).txt etc.

The above scinerio for with the reference of file .The same thing should be done with reference of file content .If content is same the above process should happen.I am not sure what you are trying to do...Are you coping a file from one place to another keeping the same name at the new location? Or are you coping the file to a new location and changing the name and then checking to see if the files match?

Also are these all text files?

I think what he is trying to do is compare the CONTENTS of the file to see if they are the same. I believe he wants to make sure the contents are or not.  Now, there used to be an OLD DOS based Norton program (Norton Utilities) that WOULD compare the contents of a file (where you could split the screen and see the same file name say from two different drives in each side of the split screen and Norton would high light the same or additional content of that same file name)  but WOW that was years ago since I've seen my copy even. My suggestion, since you can not compare the contents of the file in any Windows program that I know of, I would look at the file size and compare that to the file that you are trying to copy into the, I take it, the same folder. Hope I'm right in that assumption. If the file size is the exact same then, it would be prudent to assume that they have the same content. other than that... Your going to have to read the file manually and make the best guess as to weather they are the same or not.

All the best with that

God Bless

Doc

Quote from: seeneedee on December 20, 2010, 11:31:25 PM

hi friend,

How can we read the content of copied file and compare with the content of files in destination folder (where we are going to paste)?

example:

My purpose is to when we copy and paste multiple times of with  samefile name(e.g 1.txt) it is pasted as  copy of (1).txt,copy of (2).txt etc.

The above scinerio for with the reference of file .The same thing should be done with reference of file content .If content is same the above process should happen.


WinNC

I believe I have found what you are looking for seeneedee. Took a couple of days, but I finally found a program simular to Norton Commander v5.51

Here is a program that WORKS the same way as the old DOS version of Norton Commander v5.51 way back in the old days, but this program works in Windows-x. It's called WinNC and It has the same capabilities to compare text files to one another. From different drives or different folders. Whatever you chose. It works off of the dual-pane principle. So you are able to see the comparison right there in front of you. It is a replacement file manager for  Windows Explorer, only a lot more powerful. Try it, I think you'll like it. If it helps you for what you need - Please post back and let me know.

Here is the URL for the Download site. It is at Download.com just so you know you are at the proper site for download. It should be right at the top of the list under the heading of "203 software downloads results for "Norton Commander DOS"

http://download.cnet.com/1770-20_4-0.html?query=Norton+Commander+DOS&platformSelect=Windows&tag=srch&searchtype=downloads&filterName=platform%3DWindows&filter=platform%3DWindows

Just click the Download Now button to the right.


Hope this helps

God Bless

Doc



Quote from: Doc_Vibe on December 22, 2010, 12:31:55 PM
since you can not compare the contents of the file in any Windows program that I know of

WinDiff

Addins for Visual Studio, as well as the SDK (which is free and includes WinDiff). EditpadPro has a compare option, I think JGSoft even has a software product exclusively for comparing files... sort of. (PowerGREP)

There isn't a shell extension that compares the contents of files and changes the name of the file if they are the same that I am aware of, though.

in a batch file you can do something like this (Taken from  a google search)

Code: [Select]FC file1.txt file2.txt | FIND "FC: no dif" > nul
IF ERRORLEVEL 1 echo "files different"
I like your idea better BC_P. See, the more ya learn, the more you understand that you really don't know much at all. I should shut up now - lol

Doc


Discussion

No Comment Found