Jump to content

compare contents of files in 2 diffrent folders


Recommended Posts

@pk7272,

first, report your thread and ask a mod to move it where it belongs - the General Help and Support forum.

second, think: if you were a script, how would you do it...?

right! first list all the files in both folders into two arrays, then compare the arrays. this should give you an overview on which files exist on this folder and not the other.

then extend your script: while listing the files, record their modify time. this will enable you to see which files were modified.

and if you really must, you can read the content of the files to see where a change of contents exists.

now try scripting it. hint: google "autoit list files in folder" is a good starting point.

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Link to comment
Share on other sites

19 hours ago, pk7272 said:

I have 2 folders :- Folder A and Folder B,

Is there a way to compare the contents of the files present inside them ..

Regards

yes, use _FileListToArray() for each folder then loop through one another to compare the values/fileName in each array. Is a nice project to learn AutoIt.

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...