Conditional comparing of files

October 20, 2015 at 10:59:30
Specs: Windows 7
Hi ,

I am new to batch scripting , please suggest how can I acheive the below.

I need to write a generic batchscript which will compare two files and write the delta changes to a new file.

suppose if I am passing a filename as input to the batch script as src1*.txt, the script has to check if there are any other files which are starting with the same file name src*, the directory may have multiple files starting with the same name but are appended with the DDMMMYYYY, if multiple versions of files are present then compare the latest two version files by the datestamp present in the file name and generate a new file with delta chnages by name delta.txt and archive the two files which are compared in the archived directory and rename the delta.txt to the filename which is sent as input the batch script (i.e. src_currentddmmyyyy.txt), and if there is only one file exsiting then rename the src*.txt to src_currentddmmyyyy.txt

Please suggest how can I acheive this throught windows batch script.


See More: Conditional comparing of files

Report •

October 20, 2015 at 11:33:14
"I am new to batch scripting"

Please paste on here what you have produced so far and/or let us know the parts that you are having problems with.

Always pop back and let us know the outcome - thanks

message edited by Derek

Report •
Related Solutions

Ask Question