hiteksoftware.com Forum Index hiteksoftware.com
User discussion forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to use arrays to compare files in different directories

 
Post new topic   Reply to topic    hiteksoftware.com Forum Index -> Frequently Asked Questions
View previous topic :: View next topic  
Author Message
john



Joined: 26 May 2010
Posts: 1

PostPosted: Wed Jun 02, 2010 10:51 am    Post subject: How to use arrays to compare files in different directories Reply with quote

I need some help doing the following chain of events:

1. loop through a directory.
2. for each file in the directory, check if a copy of that file exists in another directory.
3. if there is no copy, add the filename & date to an array.
4. loop through the array.
5. if file date is equal to or greater than 14 days remove the row (filename & date) from the array.
6. email the filenames remaining in the array.

Any suggestions would be greatly appreciated.
Back to top
View user's profile Send private message
melvin
Site Admin


Joined: 25 May 2006
Posts: 635
Location: Santa Barbara, california

PostPosted: Thu Jun 03, 2010 8:30 pm    Post subject: Reply with quote

try this:
1) Directory loop task - Select option to Run task if File Date is older than 15 days.
a) for every loop, run a 'file monitor' task to check if corresponding file exists
b) if corresponding file does not exist (to check, use variable task or from chain, check exit code), add the filename & date variable values using 'CSV write' task to c:\test\array.txt.
format: filename,date

2) Email the csv write file whenever required. use the format in the message body:
$$$c:\test\array.txt
(Note that with this format no other message body is allowed).
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    hiteksoftware.com Forum Index -> Frequently Asked Questions All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group