Checking for a folder and creating on network volume.
Checking for a folder and creating on network volume.
- Subject: Checking for a folder and creating on network volume.
- From: "Connor W. Anderson" <email@hidden>
- Date: Wed, 28 Feb 2001 13:03:35 -0600
I'm trying to create an automated network backup script for the settings of
our Distiller job options. Everything works great except for the part where
I try to get the script to see if there is a folder for the each desktop Mac
on the network drive, and if not to create one before doing the backup.
This script gives me the following error:
"Cannot make "os9" (the name of the startup disk) into an integer.
--checks if folder with the name of the computer is present. If not,
creates one.
set theName to the name of startup disk
if exists folder theName of "Commmon:ADOPS:AO_backups" then
else
select folder "Common:ADOPS:AO_backups"
make new folder ,
with properties {name:theName}
end if
If I try to modify the statement so:
--checks if folder with the name of the computer is present. If not,
creates one.
set theName to the name of startup disk
if exists folder theName,
with properties {name:theName} (of "Commmon:ADOPS:AO_backups") then
else
I get a syntax error: Expected "then", etc. but found "{".
I have tried a couple of ways of inserting the "with properties" call in
there, but it doesn't seem to want it in the If/then loop.
I'm close, but can't seem to figure it out.
Configuration:
OS9.04
Network drive: SFM on NT4
Standard Additons
AKUA Sweets
--
Connor W. Anderson
Desktop Publishing Specialist
Woodward Communications, Inc.
"You, you, and you panic. The rest of you follow me."