You have to login in order to post a reply to this topic.

13 replies [Last post]
thaleslaray
User offline. Last seen 2 years 5 weeks ago. Offline
Joined: 12/29/2009
Posts: 7

Hello,

I wonder if it is to automate the following task:

List the files with extension *.tif always the day before in a particular folder

Generate a report in html or excel or txt this result.

How do it?

Thank you!

codex
codex's picture
User offline. Last seen 18 weeks 4 days ago. Offline
Joined: 11/12/2009
Posts: 161
Re: List files and generate reports.

Hello there!

What exactly do you mean by: "the day before"? You are talking about the creation date, the last modified date of the files or something else?

__________________

Error is not blindness, error is cowardice

__________________

Error is not blindness, error is cowardice

thaleslaray
User offline. Last seen 2 years 5 weeks ago. Offline
Joined: 12/29/2009
Posts: 7
Re: List files and generate reports.

Hi Codex, Thanks for help.

I wish he would show me the files with extension *.tif with the creation date when the previous day.

Sorry for my bad English, I'm using a translator, I am Brazilian.

Abs

codex
codex's picture
User offline. Last seen 18 weeks 4 days ago. Offline
Joined: 11/12/2009
Posts: 161
Re: List files and generate reports.

I have attached a sample job. If it is not what you need, let me know.

AttachmentSize
Get tif files that were created yesterday.waj 16 KB
__________________

Error is not blindness, error is cowardice

__________________

Error is not blindness, error is cowardice

thaleslaray
User offline. Last seen 2 years 5 weeks ago. Offline
Joined: 12/29/2009
Posts: 7
Re: List files and generate reports.

Wonderful, you're a genius.

It worked perfectly.

Now, as the report is issued, the fields appear below?

Date Modified
Author
Title
Subject
Comments

Thanks in advance.

codex
codex's picture
User offline. Last seen 18 weeks 4 days ago. Offline
Joined: 11/12/2009
Posts: 161
Re: List files and generate reports.

Do you have Microsoft Excel installed in the machine? If yes, then it would be more practical to generate the report in an xls file, since there are many fields that you want to retrieve. Notice, that I'm talking about Microsoft Excel specifically. If you do not have it installed, we have 2 options:

1) Either generate the report in txt format (or csv which is text in its basis)
2) Or create the report in html format

So, which option do you prefer? Xls, txt, csv or html? Keep in mind that in order to create the report in xls format, Microsoft Excel must be installed

__________________

Error is not blindness, error is cowardice

__________________

Error is not blindness, error is cowardice

thaleslaray
User offline. Last seen 2 years 5 weeks ago. Offline
Joined: 12/29/2009
Posts: 7
Re: List files and generate reports.

Yes, I have Excel installed.

However, the fields

Date Modified
Author
Title
Subject
Comments

I do not know how winautomation will recognize those fields.

Thank you.

codex
codex's picture
User offline. Last seen 18 weeks 4 days ago. Offline
Joined: 11/12/2009
Posts: 161
Re: List files and generate reports.

Hm... The fields that you are referring to are probably metadata. Can you attach a sample tif file with all the fields that you mentioned so that I can experiment a bit on it?

__________________

Error is not blindness, error is cowardice

__________________

Error is not blindness, error is cowardice

thaleslaray
User offline. Last seen 2 years 5 weeks ago. Offline
Joined: 12/29/2009
Posts: 7
Re: List files and generate reports.

I sent the file attached to your e-mail.

Regards

codex
codex's picture
User offline. Last seen 18 weeks 4 days ago. Offline
Joined: 11/12/2009
Posts: 161
Re: List files and generate reports.

WinAutomation does not natively support reading of metadata. This is why I have used a small command line application that does exactly that. How you can execute the job that I attached:

1) Go to the following website: http://www.sno.phy.queensu.ca/~phil/exiftool/ and download the Windows executable (direct link can be found here).

2) Unzip the file exiftool-x.xx.zip that you just downloaded
 
3) Rename the file: exiftool(-k).exe file to exiftool.exe

4) Move the file exiftool.exe to the C:\ directory

5) Import the job that I attached and set the appropriate directory in action no.4 ("Get Files in Folder")

6) Execute the job

Notice, that the last action that saves the Excel file is disabled so that you can see the results of the process. You can of course enable it and set the name that will be used to save the Excel file.

Let me know if it works as expected :-)

AttachmentSize
Get tif files that were created yesterday_v2.waj 23 KB
__________________

Error is not blindness, error is cowardice

__________________

Error is not blindness, error is cowardice

thaleslaray
User offline. Last seen 2 years 5 weeks ago. Offline
Joined: 12/29/2009
Posts: 7
Re: List files and generate reports.

Wow! this is fantastic!

it worked perfectly, that was exactly what I wanted, helped me a lot!

unintentionally abuse, What is the parameter that I use to save the file with the name of the date of the day?

Tks

codex
codex's picture
User offline. Last seen 18 weeks 4 days ago. Offline
Joined: 11/12/2009
Posts: 161
Re: List files and generate reports.

If you are talking about the Excel file name (in the Close Excel action), you can find specific details in the job that I attached.

I have added a comment that explains how you can do it:

How To Apply Various Elements in the file name:

Year (number): %CurrentDateTime.Year% (e.g. 2009)
Month (number): %CurrentDateTime.Month% (e.g. 12)
Day (number): %CurrentDateTime.Day% (e.g. 29)
Day (text): %CurrentDateTime.DayOfWeek% (e.g. Tuesday)

AttachmentSize
Get tif files that were created yesterday_v3.waj 23 KB
__________________

Error is not blindness, error is cowardice

__________________

Error is not blindness, error is cowardice

thaleslaray
User offline. Last seen 2 years 5 weeks ago. Offline
Joined: 12/29/2009
Posts: 7
Re: List files and generate reports.

Thank you very much!

Now it's perfect!

This program is great, I'll have to buy the company and I recommend the software to all my friends!

Thanks

mvarner
mvarner's picture
User offline. Last seen 13 weeks 4 days ago. Offline
Joined: 02/09/2011
Posts: 3
Re: List files and generate reports.

I am evaluating winautomation for a project I am working on and this example is very close to what I want to do.

 

I have a folder with several jpg files.  I want to read the metadata from each file and create a text file for each image with the same name as the jpg file and containing all metadata.

 

How would I modify this sample to do this.

 

Marshall

__________________

Marshall W. Varner

Director of Information Technology for Freedom PNC

 

__________________

Marshall W. Varner

Director of Information Technology for Freedom PNC