How to verify two copied files are exactly the same in Windows?
I’m doing a backup on my Samsung rv420 running Windows 7 Home Starter Edition.
In order to do it, I want to ensure that when making a copy from my computer to a external device, the files being copied do not change in the slightest. For that, I’ll do the next: I’ll take a file from my computer, copy it in the external device, and then copy it again from the external device to the computer. So the file has “traveled” trought the device, and I want to know if it's changed or not.
I know little abut hash functions. I have a program called FileMenu Tools that includes a function for calculating a couple of different hash algorithms. I hope the program does it job properly.
I did what I described with a file, I, logically, ended with two files, original and a copy I left in the desktop. I calculated the hash function and it wasn’t the same.
I don't know why is this. The hash varies upon in which directory is located a file?
What can you recommend me to achieve what I want, which is checking a file is exactly the same after traveling trought external device?
windows-7 windows hashing
add a comment |
I’m doing a backup on my Samsung rv420 running Windows 7 Home Starter Edition.
In order to do it, I want to ensure that when making a copy from my computer to a external device, the files being copied do not change in the slightest. For that, I’ll do the next: I’ll take a file from my computer, copy it in the external device, and then copy it again from the external device to the computer. So the file has “traveled” trought the device, and I want to know if it's changed or not.
I know little abut hash functions. I have a program called FileMenu Tools that includes a function for calculating a couple of different hash algorithms. I hope the program does it job properly.
I did what I described with a file, I, logically, ended with two files, original and a copy I left in the desktop. I calculated the hash function and it wasn’t the same.
I don't know why is this. The hash varies upon in which directory is located a file?
What can you recommend me to achieve what I want, which is checking a file is exactly the same after traveling trought external device?
windows-7 windows hashing
There isn't much to go on here. Why do you need to copy the file back? If you want to know that the exported copy matches, why not just compare its hash to the original file? What OS are you using? For simple file verification, you could use MD5, which is fast and simple to run from a command. Without knowing more about your software and what's going on, it's hard to speculate about why the hash might be different.
– fixer1234
Aug 24 '15 at 4:35
I'm using windows 7 home starter on samsung rv420. The sofware is FileMenu Tools as said in the question. I need to copy again because I'm simulating a back up, to know if the files complete the back up intact. I'll try your suggestion in a couple of days.
– Santropedro
Aug 24 '15 at 4:40
See stackoverflow.com/questions/8166697/…
– VoidStar
Aug 24 '15 at 4:54
1
So you're manually doing file backup/restore by copying the files to an external drive and copying them back, using file manager software? Your objective is just to pre-test the procedure to verify that it can restore your files without corruption? Have you thought about using software designed for the purpose (backup software)? That would give you benefits like automating the task, doing it in the background, etc. Many include hash verification so you don't have to manually spot-check files. There are lots of free utilities that will compare file hashes if you want to check FileMenu.
– fixer1234
Aug 24 '15 at 5:11
add a comment |
I’m doing a backup on my Samsung rv420 running Windows 7 Home Starter Edition.
In order to do it, I want to ensure that when making a copy from my computer to a external device, the files being copied do not change in the slightest. For that, I’ll do the next: I’ll take a file from my computer, copy it in the external device, and then copy it again from the external device to the computer. So the file has “traveled” trought the device, and I want to know if it's changed or not.
I know little abut hash functions. I have a program called FileMenu Tools that includes a function for calculating a couple of different hash algorithms. I hope the program does it job properly.
I did what I described with a file, I, logically, ended with two files, original and a copy I left in the desktop. I calculated the hash function and it wasn’t the same.
I don't know why is this. The hash varies upon in which directory is located a file?
What can you recommend me to achieve what I want, which is checking a file is exactly the same after traveling trought external device?
windows-7 windows hashing
I’m doing a backup on my Samsung rv420 running Windows 7 Home Starter Edition.
In order to do it, I want to ensure that when making a copy from my computer to a external device, the files being copied do not change in the slightest. For that, I’ll do the next: I’ll take a file from my computer, copy it in the external device, and then copy it again from the external device to the computer. So the file has “traveled” trought the device, and I want to know if it's changed or not.
I know little abut hash functions. I have a program called FileMenu Tools that includes a function for calculating a couple of different hash algorithms. I hope the program does it job properly.
I did what I described with a file, I, logically, ended with two files, original and a copy I left in the desktop. I calculated the hash function and it wasn’t the same.
I don't know why is this. The hash varies upon in which directory is located a file?
What can you recommend me to achieve what I want, which is checking a file is exactly the same after traveling trought external device?
windows-7 windows hashing
windows-7 windows hashing
edited Aug 24 '15 at 4:42
JakeGould
32.1k1098141
32.1k1098141
asked Aug 24 '15 at 4:11
SantropedroSantropedro
271420
271420
There isn't much to go on here. Why do you need to copy the file back? If you want to know that the exported copy matches, why not just compare its hash to the original file? What OS are you using? For simple file verification, you could use MD5, which is fast and simple to run from a command. Without knowing more about your software and what's going on, it's hard to speculate about why the hash might be different.
– fixer1234
Aug 24 '15 at 4:35
I'm using windows 7 home starter on samsung rv420. The sofware is FileMenu Tools as said in the question. I need to copy again because I'm simulating a back up, to know if the files complete the back up intact. I'll try your suggestion in a couple of days.
– Santropedro
Aug 24 '15 at 4:40
See stackoverflow.com/questions/8166697/…
– VoidStar
Aug 24 '15 at 4:54
1
So you're manually doing file backup/restore by copying the files to an external drive and copying them back, using file manager software? Your objective is just to pre-test the procedure to verify that it can restore your files without corruption? Have you thought about using software designed for the purpose (backup software)? That would give you benefits like automating the task, doing it in the background, etc. Many include hash verification so you don't have to manually spot-check files. There are lots of free utilities that will compare file hashes if you want to check FileMenu.
– fixer1234
Aug 24 '15 at 5:11
add a comment |
There isn't much to go on here. Why do you need to copy the file back? If you want to know that the exported copy matches, why not just compare its hash to the original file? What OS are you using? For simple file verification, you could use MD5, which is fast and simple to run from a command. Without knowing more about your software and what's going on, it's hard to speculate about why the hash might be different.
– fixer1234
Aug 24 '15 at 4:35
I'm using windows 7 home starter on samsung rv420. The sofware is FileMenu Tools as said in the question. I need to copy again because I'm simulating a back up, to know if the files complete the back up intact. I'll try your suggestion in a couple of days.
– Santropedro
Aug 24 '15 at 4:40
See stackoverflow.com/questions/8166697/…
– VoidStar
Aug 24 '15 at 4:54
1
So you're manually doing file backup/restore by copying the files to an external drive and copying them back, using file manager software? Your objective is just to pre-test the procedure to verify that it can restore your files without corruption? Have you thought about using software designed for the purpose (backup software)? That would give you benefits like automating the task, doing it in the background, etc. Many include hash verification so you don't have to manually spot-check files. There are lots of free utilities that will compare file hashes if you want to check FileMenu.
– fixer1234
Aug 24 '15 at 5:11
There isn't much to go on here. Why do you need to copy the file back? If you want to know that the exported copy matches, why not just compare its hash to the original file? What OS are you using? For simple file verification, you could use MD5, which is fast and simple to run from a command. Without knowing more about your software and what's going on, it's hard to speculate about why the hash might be different.
– fixer1234
Aug 24 '15 at 4:35
There isn't much to go on here. Why do you need to copy the file back? If you want to know that the exported copy matches, why not just compare its hash to the original file? What OS are you using? For simple file verification, you could use MD5, which is fast and simple to run from a command. Without knowing more about your software and what's going on, it's hard to speculate about why the hash might be different.
– fixer1234
Aug 24 '15 at 4:35
I'm using windows 7 home starter on samsung rv420. The sofware is FileMenu Tools as said in the question. I need to copy again because I'm simulating a back up, to know if the files complete the back up intact. I'll try your suggestion in a couple of days.
– Santropedro
Aug 24 '15 at 4:40
I'm using windows 7 home starter on samsung rv420. The sofware is FileMenu Tools as said in the question. I need to copy again because I'm simulating a back up, to know if the files complete the back up intact. I'll try your suggestion in a couple of days.
– Santropedro
Aug 24 '15 at 4:40
See stackoverflow.com/questions/8166697/…
– VoidStar
Aug 24 '15 at 4:54
See stackoverflow.com/questions/8166697/…
– VoidStar
Aug 24 '15 at 4:54
1
1
So you're manually doing file backup/restore by copying the files to an external drive and copying them back, using file manager software? Your objective is just to pre-test the procedure to verify that it can restore your files without corruption? Have you thought about using software designed for the purpose (backup software)? That would give you benefits like automating the task, doing it in the background, etc. Many include hash verification so you don't have to manually spot-check files. There are lots of free utilities that will compare file hashes if you want to check FileMenu.
– fixer1234
Aug 24 '15 at 5:11
So you're manually doing file backup/restore by copying the files to an external drive and copying them back, using file manager software? Your objective is just to pre-test the procedure to verify that it can restore your files without corruption? Have you thought about using software designed for the purpose (backup software)? That would give you benefits like automating the task, doing it in the background, etc. Many include hash verification so you don't have to manually spot-check files. There are lots of free utilities that will compare file hashes if you want to check FileMenu.
– fixer1234
Aug 24 '15 at 5:11
add a comment |
1 Answer
1
active
oldest
votes
A native solution to Windows (without downloading third party) is to use some powershell commands.
Open powershell.exe (either as user or admin). Then, use the following command.
Compare-Object "$(Get-Content $PATH1)" "$(Get-Content $PATH2)"
You can set $PATH1
and $PATH2
to your file paths and copy paste the command above.
If it returns nothing, the files are identical in content, which is what I believe you want. Note that this command does not check for identical permissions, identical modified date, etc. To compare identical modified date and mode, use the following command.
Compare-Object "$(Get-ItemProperty $PATH1 | Select-Object Mode, LastWriteTime)" "$(Get-ItemProperty $PATH2 | Select-Object Mode, LastWriteTime)"
To compare the permission, use the following command.
Compare-Object "$(Get-Acl $PATH1).Access" "$(Get-Acl $PATH2).Access"
Again, you can set $PATH1
and $PATH2
and just copy and paste the commands above.
In all three commands, if it returns something, you know that they are not the same. On the other hand, if it returns nothing, you know that they are exactly the same in content (1st command), last write time and mode (2nd command), and permissions (3rd command).
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f961787%2fhow-to-verify-two-copied-files-are-exactly-the-same-in-windows%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
A native solution to Windows (without downloading third party) is to use some powershell commands.
Open powershell.exe (either as user or admin). Then, use the following command.
Compare-Object "$(Get-Content $PATH1)" "$(Get-Content $PATH2)"
You can set $PATH1
and $PATH2
to your file paths and copy paste the command above.
If it returns nothing, the files are identical in content, which is what I believe you want. Note that this command does not check for identical permissions, identical modified date, etc. To compare identical modified date and mode, use the following command.
Compare-Object "$(Get-ItemProperty $PATH1 | Select-Object Mode, LastWriteTime)" "$(Get-ItemProperty $PATH2 | Select-Object Mode, LastWriteTime)"
To compare the permission, use the following command.
Compare-Object "$(Get-Acl $PATH1).Access" "$(Get-Acl $PATH2).Access"
Again, you can set $PATH1
and $PATH2
and just copy and paste the commands above.
In all three commands, if it returns something, you know that they are not the same. On the other hand, if it returns nothing, you know that they are exactly the same in content (1st command), last write time and mode (2nd command), and permissions (3rd command).
add a comment |
A native solution to Windows (without downloading third party) is to use some powershell commands.
Open powershell.exe (either as user or admin). Then, use the following command.
Compare-Object "$(Get-Content $PATH1)" "$(Get-Content $PATH2)"
You can set $PATH1
and $PATH2
to your file paths and copy paste the command above.
If it returns nothing, the files are identical in content, which is what I believe you want. Note that this command does not check for identical permissions, identical modified date, etc. To compare identical modified date and mode, use the following command.
Compare-Object "$(Get-ItemProperty $PATH1 | Select-Object Mode, LastWriteTime)" "$(Get-ItemProperty $PATH2 | Select-Object Mode, LastWriteTime)"
To compare the permission, use the following command.
Compare-Object "$(Get-Acl $PATH1).Access" "$(Get-Acl $PATH2).Access"
Again, you can set $PATH1
and $PATH2
and just copy and paste the commands above.
In all three commands, if it returns something, you know that they are not the same. On the other hand, if it returns nothing, you know that they are exactly the same in content (1st command), last write time and mode (2nd command), and permissions (3rd command).
add a comment |
A native solution to Windows (without downloading third party) is to use some powershell commands.
Open powershell.exe (either as user or admin). Then, use the following command.
Compare-Object "$(Get-Content $PATH1)" "$(Get-Content $PATH2)"
You can set $PATH1
and $PATH2
to your file paths and copy paste the command above.
If it returns nothing, the files are identical in content, which is what I believe you want. Note that this command does not check for identical permissions, identical modified date, etc. To compare identical modified date and mode, use the following command.
Compare-Object "$(Get-ItemProperty $PATH1 | Select-Object Mode, LastWriteTime)" "$(Get-ItemProperty $PATH2 | Select-Object Mode, LastWriteTime)"
To compare the permission, use the following command.
Compare-Object "$(Get-Acl $PATH1).Access" "$(Get-Acl $PATH2).Access"
Again, you can set $PATH1
and $PATH2
and just copy and paste the commands above.
In all three commands, if it returns something, you know that they are not the same. On the other hand, if it returns nothing, you know that they are exactly the same in content (1st command), last write time and mode (2nd command), and permissions (3rd command).
A native solution to Windows (without downloading third party) is to use some powershell commands.
Open powershell.exe (either as user or admin). Then, use the following command.
Compare-Object "$(Get-Content $PATH1)" "$(Get-Content $PATH2)"
You can set $PATH1
and $PATH2
to your file paths and copy paste the command above.
If it returns nothing, the files are identical in content, which is what I believe you want. Note that this command does not check for identical permissions, identical modified date, etc. To compare identical modified date and mode, use the following command.
Compare-Object "$(Get-ItemProperty $PATH1 | Select-Object Mode, LastWriteTime)" "$(Get-ItemProperty $PATH2 | Select-Object Mode, LastWriteTime)"
To compare the permission, use the following command.
Compare-Object "$(Get-Acl $PATH1).Access" "$(Get-Acl $PATH2).Access"
Again, you can set $PATH1
and $PATH2
and just copy and paste the commands above.
In all three commands, if it returns something, you know that they are not the same. On the other hand, if it returns nothing, you know that they are exactly the same in content (1st command), last write time and mode (2nd command), and permissions (3rd command).
edited Aug 25 '15 at 5:41
answered Aug 25 '15 at 5:35
nehcsivartnehcsivart
428311
428311
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f961787%2fhow-to-verify-two-copied-files-are-exactly-the-same-in-windows%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
There isn't much to go on here. Why do you need to copy the file back? If you want to know that the exported copy matches, why not just compare its hash to the original file? What OS are you using? For simple file verification, you could use MD5, which is fast and simple to run from a command. Without knowing more about your software and what's going on, it's hard to speculate about why the hash might be different.
– fixer1234
Aug 24 '15 at 4:35
I'm using windows 7 home starter on samsung rv420. The sofware is FileMenu Tools as said in the question. I need to copy again because I'm simulating a back up, to know if the files complete the back up intact. I'll try your suggestion in a couple of days.
– Santropedro
Aug 24 '15 at 4:40
See stackoverflow.com/questions/8166697/…
– VoidStar
Aug 24 '15 at 4:54
1
So you're manually doing file backup/restore by copying the files to an external drive and copying them back, using file manager software? Your objective is just to pre-test the procedure to verify that it can restore your files without corruption? Have you thought about using software designed for the purpose (backup software)? That would give you benefits like automating the task, doing it in the background, etc. Many include hash verification so you don't have to manually spot-check files. There are lots of free utilities that will compare file hashes if you want to check FileMenu.
– fixer1234
Aug 24 '15 at 5:11