6979faefbacb4dee06d02fb1aad9714d

Comparing files for qualified File transferral

Discussion created by 6979faefbacb4dee06d02fb1aad9714d on May 28, 2015
Latest reply on May 29, 2015 by Mark_Hadler_430
Hi All,

I'm having a bit of a problem with one part of my code for checking the files from one directory against another one to then determine if they've been modified recently. Namely in this part:

:SET &PRC# = PREP_PROCESS("server","WINCMD","**/**/****", "CMD=dir /t:w D:\MRAtest\013\Documents", "COL=DELIMITER", "DELIMITER=% %", "UC_LOGIN=LOGIN.BERTIE")

So the "**/**/****" is the only way I've gotten this part of the code to work where it takes only lines which start with that (so the lines which have the date) but the issue I'm having is that the "dir" command doesn't produce lists that are formatted well at all. The delimiter I'm using is just two spaces but when using "dir" the spacing is wacky, it's two for the first gap and then four for the next gap and then three and then one like so:

04/29/2015  08:23 AM            41,504 Capture.PNG
04/30/2015  08:06 AM    <DIR>          Contacts

The problem here is that I need to be able to get both the filename and the date, I don't care about the size or specific time but I can't figure out how to do that with "dir" or if it's even possible.

Basically, to lay it all out, my idea is to pull this info into a process loop in UC4 and then set "if" statements to qualify for when the files name match and if they do then do another "if" to see if the dates match. If the dates match, it will pass over the file entirely but if the dates are incongruous it will perform the FT.

Please let me know if anyone has any insight into this!

Thanks,
Bertie

Outcomes