Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Applescript to copy file from Mac to Windows network server

Status
Not open for further replies.

itmt

IS-IT--Management
Jan 7, 2002
122
GB
Hi all,

I am no Mac expert! I administer a Windows domain and have the following dilema. I need a script that will (automatically, same time each night if possible) copy 1 file per Mac (email) to a networked Windows 2003 server. The Mac clients have access to shared resources on this server already.

I have found the script editor but have no real idea where to go after that? Any geniuses out there able to help me?

Thanks,

Torro
 
Applescript doesn't do timed tasks.

Why are you using email, anyway? Wouldn't it be easier to use a cron job?
 
Can Applescript be manually run then by the user - say at the end of each day?

Sorry - don't know what a cron job is?

Basically, a user lost a load of emails and (because the POP3 mail is downloaded and stored on the MAC) there was no effective back up.

The PC users also download the POP3 but store their PST's on their Home directories on the Windows Server. Obviously this is centrally managed and backed up and, therfore, recoverable.

I need to find a solution to guard against data loss for the Mac email files. Someone suggested Applescript to copy the email files to the Windows Server. Can this be done? Or can the mail be located on the server anyway with the Mac slients pointing towards it?

What is the best solution!?

Thanks very mcuuh in advance.
 
If it's only a few mac users and email backup is the only problem, couldn't you configure the mail client on the macs to leave the incoming message on the server.

I work in an all mac enviroment with mail on a linux box. We have Entourage (account/options) set to leave the message on the server for each client to avoid data loss.

Using OSX 10.3.8 on a G4
 
Not a bad idea but we have thought of that and turned it down. They work in a fashion design department and the mails are too big to leave a copy on the server (limited to 100MB per mailbox)

Any other ideas greatly appreciated!
 
Hi Torro

If you can tell me the terminal command you would use to copy the file i will help you set up a CRON job to automate it


Kind Regards
Duncan
 
Duncdude,

That is really kind. But as I said at the top of this post, I don't know where to start. I am not sure of the syntax to use? I have found the script editor but that is about it.

If this were a PC then a batch file and scheduled task would be easy!!

Thanks in advance,

Torro
 
You said "I need to find a solution to guard against data loss for the Mac email files"

I'm assuming the users are using Entourage (mac versiom of Outlook in Office). If so you can set up some new rules in Entourage. Let's say : Click Rules/New Rule. Execute - if any criteria are met Apply to All messages.
Add Action - Copy message. To - Choose folder.

At that point you have quite a few options. If the user's share is permantly mounted on their desktop you can select the share or subfolder as the Copy to destination. You can then set up a new schedule in Entouraage to run the new rule. If the people leave Entourage permantly on, it would probably be best to set a timed schedule. If they don't leave it on, you could set the scedule for on launch, on quit, etc.

If their share is not always mounted, you could at least put a new folder on their computer where Entourage would copy the mesages to so they have another copy - named something like Mail backup. you could also buy some outboard firewire drives so these peoplw would have backup for all their work - just not mail. We use drive for OWComputing.com for all our machines. These also come with a backup program.

You could also try recording a simple Applescript if the people are not permanently connected to the server. Launch the Applescript application and click Start Recording. Click somewhere on teh desktop to go to Finder. On the Macs Go menu click connect to Server so as to connect to therir share. Clcik on the Applscript icon on the doc to get you back to Applescript and hit Stop recording. Test and compile if it works. I haven't played with Applescript since about OS8 so I don't know if this way of recording scripts still works. If it does name and save the script.

Go back to entourage and RULES. One of the options is Run Applescript. You would put that action BEFORE the Copy to folder that I mentioned earlier. You would then set eh schedule for Entourage to run the script connecting to server and copying the emails to the appropriate folder.

Lastly, there are alot of backup apps available. Here's a link to to the Versiontracker.com page for mac backup apps.

Retrospect is the oldest and most accepted but you'll find others there.

By the way, I'm one of those graphics people. We always curse the admins who set up the limits on the mail boxes. If you're sending someone a 40 MB prepress quality pdf, it doesn't take long to fill that box.

Using OSX 10.3.8 on a G4
 
Thank you very, very much for this. The shareware looks like a good option for me.

have a good day.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top