Jump to content
Macro Express Forums

Compare 2 very large text files


patgenn123

Recommended Posts

<BTFBEG:002:000001:000000:C:\Documents and Settings\Pat\Desktop\Count Total Files in Favorites.txt><TMVAR2:05:02:02:000:000:><BTFEND><IVAR2:01:01:1><ASCIIC:95:1:13><ASCIIC:96:1:10><TVAR2:95:01:%T95%%T96%><REP3:07:000004:000001:0001:0:01:C:\Documents and Settings\Pat\Favorites><NMVAR:08:01:0:0000001:0:0000000><TMVAR2:08:01:95:000:000:><TMVAR2:08:02:01:000:000:><ENDREP><TMVAR2:17:02:00:000:000:C:\Documents and Settings\Pat\Desktop\All file Names.txtF><NMVAR:05:01:0:0000003:0:0000000><TMVAR2:17:03:00:000:000:C:\Documents and Settings\Pat\Desktop\Count Total Files in Favorites.txtF><NMVAR:02:03:1:0000001:1:0000002><TBOX4:T:1:CenterCenter000278000200:000:Number of Files CopiedThere were %N1% files copied

You have added %N3% new files since last update>;

 

 

This macro spits through 43,000 files in about 6 minutes. It also recognizes how many more files have been added since the last scheduled run.

 

The question is: How can I have Macro Express recognize/isolate the newest files added by name?

 

I am scratching my head...

 

Pat

Link to comment
Share on other sites

Hi Pat,

 

I think I have a solution to your problem.

 

The line where you save %T2% to "All file Names.txt" is where this code needs to be inserted.

My code includes this line, so don't forget to remove yours (it's important that the first part of

this code occur before T2 gets saved as a text file, and equally important that the rest of it falls

afterwards - Or you can just replace your entire code with the Full Macro Code that I put down

at the very bottom - I gave just the code I added first in case you wanted to look at it and pick

it apart for your own amusement).

 

Once you have done this, you can either write some code to open the "New File Names.txt" file

that this code creates at the end of the macro, or plug %T5% into your Text Box Display where

the number of new files is displayed.

 

If you have any trouble with this, double-check the paths (I changed them to work on my

computer for me as I tested it, and tried to get them all changed back but I might have missed

something), otherwise, if there is trouble, let me know and I'll try to help you out!

 

P.S. You may want to consider setting %T2% back to "" before running the "Repeat with Folder"

command, as the Value of T2 is getting saved into the All File Names.txt (unless you want it there,

of course - I did not make this change in the Full Macro Code).

 

 

Here's the code.:

 

Direct Editor

 

<IFOTH:01:2:C:\Documents and Settings\Pat\Desktop\Old File Names.txt><TVAR2:05:04:C:\Documents and Settings\Pat\Desktop\Old File Names.txt><ELSE><DOFILE:05:NN:C:\Documents and Settings\Pat\Desktop\All file Names.txt>C:\Documents and Settings\Pat\Desktop\Old File Names.txt><ENDIF><TMVAR2:17:02:00:000:000:C:\Documents and Settings\Pat\Desktop\All file Names.txtF><TVAR2:06:01:%T5%><BTFBEG:004:000001:000000:C:\Documents and Settings\Pat\Desktop\All File Names.txt><TMVAR2:21:05:01:000:000:%T4%><BTFEND><TMVAR2:17:05:00:000:000:C:\Documents and Settings\Pat\Desktop\New File Names.txtF>

 

If File Exists "Old File Names.txt"
 Variable Set String %T5% from File: "Old File Names.txt"
Else
 Copy File or Files: "All file Names.txt"
End If
Variable Modify String: Save %T2% to Text File
Variable Set String %T6% "%T5%"
Text File Begin Process: "All File Names.txt"
 Replace "%T4%" with "" in %T5%
Text File End Process
Variable Modify String: Save %T5% to Text File

 

The Full Macro Code

 

<BTFBEG:002:000001:000000:C:\Documents and Settings\Pat\Desktop\Count Total Files in Favorites.txt><TMVAR2:05:02:02:000:000:><BTFEND><IVAR2:01:01:1><ASCIIC:95:1:13><ASCIIC:96:1:10><TVAR2:95:01:%T95%%T96%><REP3:07:000004:000001:0001:0:01:C:\Documents and Settings\Pat\Favorites><NMVAR:08:01:0:0000001:0:0000000><TMVAR2:08:01:95:000:000:><TMVAR2:08:02:01:000:000:><ENDREP><IFOTH:01:2:C:\Documents and Settings\Pat\Desktop\Old File Names.txt><TVAR2:05:04:C:\Documents and Settings\Pat\Desktop\Old File Names.txt><ELSE><DOFILE:05:NN:C:\Documents and Settings\Pat\Desktop\All file Names.txt>C:\Documents and Settings\Pat\Desktop\Old File Names.txt><ENDIF><TMVAR2:17:02:00:000:000:C:\Documents and Settings\Pat\Desktop\All file Names.txtF><TVAR2:06:01:%T5%><BTFBEG:004:000001:000000:C:\Documents and Settings\Pat\Desktop\All File Names.txt><TMVAR2:21:05:01:000:000:%T4%><BTFEND><TMVAR2:17:05:00:000:000:C:\Documents and Settings\Pat\Desktop\New File Names.txtF><NMVAR:05:01:0:0000003:0:0000000><TMVAR2:17:03:00:000:000:C:\Documents and Settings\Pat\Desktop\Count Total Files in Favorites.txtF><NMVAR:02:03:1:0000001:1:0000002><TBOX4:T:1:CenterCenter000278000200:000:Number of Files CopiedThere were %N1% files copiedYou have added %N3% new files since last update><TEXTTYPE:;>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...