Automated "Open File" - "Rename File" -

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
nbell
Newbie
Posts: 11
Joined: Mon Nov 11, 2002 2:51 pm
Location: China
Contact:

Automated "Open File" - "Rename File" -

Post by nbell » Mon Jun 11, 2007 12:48 pm

My wife and I own and operate orphanages in China.

We have a daily report that is required on each baby in the Nursery. By the end of the month we have a stack of paper reports a mile high...

I want to change this to computerized reporting by the Nursery Staff.

I have the Document finished in Excel. It is housed on the Master computer in our network and is called simply Nursery_Report.xls

What we are doing manually now is this.

At 7:00 AM I go to the nursery, open the file Nursery_Report.xls and just leave it open for the staff to record temperatures, food intake etc. etc. all day.

The next morning I go there at 7:00 AM again (that is our shift change time) and save the current working file as "Todays Date"_Nursery_Report.xls. (i.e. 20070611_Nursery_Report.xls)

Then I close the file then reopen the blank Nursery_Report.xls and the routine starts again.

I would like to automate this whole Process with MS.

Can someone help me?

My biggest problem right now is the auto renaming of the file and the times when MS should execute the script.

By the way, the computer stays on 24 hours a day, as does the rest of the computers on the network.

Please Help?????

Thank You!
May I live my life so the worth of my life
Far outlasts the Years of my life!

Aaron
Pro Scripter
Posts: 113
Joined: Mon Apr 09, 2007 1:35 am
Location: Wyoming

This should help

Post by Aaron » Mon Jun 11, 2007 8:14 pm

Code: Select all

Label>LOOP
wait>0.3
GetTime>Time

If>Time=7:00:00 AM,NEXT,LOOP

Label>NEXT

Day>the_day
Month>the_month
Year>the_year
Let>SaveAs=%the_year%%the_month%%the_day%_Nursery_Report.xls

Let>SaveFromDirectory=C:\Temp\Nursery_Report.xls
Let>SaveToDirectory=C:\Temp\%SaveAs%

CopyFile>%SaveFromDirectory%,%SaveToDirectory%
wait>0.3
SetFocus>Nursery_Report.xls
wait>0.3
CloseWindow>Nursery_Report.xls
wait>0.3
ExecuteFile>C:\Temp\Nursery_Report.,


you said
The next morning I go there at 7:00 AM again (that is our shift change time) and save the current working file as "Todays Date"_Nursery_Report.xls. (i.e. 20070611_Nursery_Report.xls)

Then I close the file then reopen the blank Nursery_Report.xls and the routine starts again.
when the file is closed and then reopened it will still have the contents that it had before you closed it. Dont try and go the day without saving the file as you will probably loss your input now and then.
I suggest that if you what the file to be blank without any visitors from the previous day, save a file how you would like it to appear, In a differant name.
Every morning instead of opening the file Nursery_Report.xls, copy the blank file and change the name to Nursery_Report.xls in the new location.

If this is what you want, you should delete Nursery_Report.xls after saving it with the name 20070611_Nursery_Report.xls.

If you need more help, be clear as what you want done and I will do my best to help

Good Luck
Aaron

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts