|
| saving/opening files transparently on different OS |
 |
Tue, 18 Mar 2008 16:33:37 -070 |
I have a database that is accessed by users with 3 different OS. I
cannot seem to export a file and import it without user input. I had
a script working fine when we were all using Win XP, but now one
person is using a mac and another windows vista. Both of these users
have the following message occur when they run a script that saves a
file to their local machine. "File Cannot be created on this
disk....use a different disk". The mac error message is slightly
different, but essentially the same problem.
What I want to do is export a file into an excel doc and then import
the same file. How can I make this transparent to the users with all
these different operating systems?
I tried the relative path, but not all my users even have the same
folders.....I was using C:\filename for the XP machines, but the Vista
OS doesn't like that.
Any suggestions?
Thanks,
|
| Post Reply
|
| Re: saving/opening files transparently on different OS |
 |
Tue, 18 Mar 2008 21:19:42 -070 |
Mary Takle wrote:
> I tried the relative path, but not all my users even have the same
> folders.....I was using C:\filename for the XP machines, but the Vista
> OS doesn't like that.
In your script, set a variable (i.e. $filepath) to:
"file:" & Get(TemporaryPath) & "filename.xls"
Now for your file reference in the Export and Import script steps, just
use the $filepath variable.
I might also ask why you are doing this. Depending on your needs, you
might be better off just transferring data between internal FileMaker
|
| Post Reply
|
| Re: saving/opening files transparently on different OS |
 |
Wed, 19 Mar 2008 16:20:40 +120 |
In article
<0f8bbdc0-8ebe-49f3-97d8-e5865bd4eab1@e6g2000prf.googlegroups.com>,
Mary Takle <marytakle@gmail.com> wrote:
> I have a database that is accessed by users with 3 different OS. I
> cannot seem to export a file and import it without user input. I had
> a script working fine when we were all using Win XP, but now one
> person is using a mac and another windows vista. Both of these users
> have the following message occur when they run a script that saves a
> file to their local machine. "File Cannot be created on this
> disk....use a different disk". The mac error message is slightly
> different, but essentially the same problem.
>
> What I want to do is export a file into an excel doc and then import
> the same file. How can I make this transparent to the users with all
> these different operating systems?
>
> I tried the relative path, but not all my users even have the same
> folders.....I was using C:\filename for the XP machines, but the Vista
> OS doesn't like that.
>
> Any suggestions?
>
> Thanks,
>
> Mary
The "relative path" is the one based on where the FileMaker database
is
and this is the one you should use. Using a "full path" won't work
because as you've found out users may not have the same folders, and
"C:" is meaningless on a Mac (unless perhaps someone has called their
hard drvie "C" instead of the defauls "Macintosh HD").
The easiest option is to Export to and Import from a file in the same
folder as the database itself (so there is no path to worry about).
Make sure to use the "No Dialog" option so that users can't change
the
location manually.
"File cannot be created" error might be caused by permission problems
as well, especially if using a server.
Helpful Harry
|
| Post Reply
|
| Re: saving/opening files transparently on different OS |
 |
Wed, 19 Mar 2008 21:10:21 -070 |
On Mar 18, 9:19 pm, Howard Schlossberg
<how...@nospam.fmprosolutions.com> wrote:
> Mary Takle wrote:
> > I tried the relative path, but not all my users even have the same
> > folders.....I was using C:\filename for the XP machines, but the
Vista
> > OS doesn't like that.
>
> In your script, set a variable (i.e. $filepath) to:
> "file:" & Get(TemporaryPath) &
"filename.xls"
>
> Now for your file reference in the Export and Import script steps, just
> use the $filepath variable.
>
> I might also ask why you are doing this. Depending on your needs, you
> might be better off just transferring data between internal FileMaker
> tables (even if it is just a 'temp data' table).
I could not get this to work...I think it is because the DB is stored
on a server and I was doing a relative save.
Is there some way to figure out what OS the user is running on their
local machine without asking them? I didn't see a
Get(OperatingSystem).
Howard, you bring up a good question. Perhaps you can recommend a
better way for me to do this.
I have 2 different uses for this file save / retrieve stuff.
First use:
I need to send a bunch of emails from a script...find data, save data
as pdf, send email with pdf attached...go to next person..repeat until
everyone has their info. I would like to completely automate this,
but can't seem to get around the different local operating systems
causing so much trouble. I can ask the user what OS they are using
and then based on that response save the file using a full reference.
C:\filename works for XP. Is there a directory/filename that would
work for any mac? (I'm not a mac user) I don't think I have the
ability to save files on the server.
I think the Vista thing might be security related....I'll fiddle
around with my Vista machine and see if I can find a filename that
works. Vista can be pretty onery!
The other use...the one with excel files is a table transfer. I have
a table called "next year" ...a list of classes for a school. Once a
year we clean out the "this year" table and copy all the next year
info into the this year table. I couldn't figure out a way to do this
without exporting the table and then importing it back into the new
table. I can't recall the issues I had while I was working through
the process (i think it was something with the automatically created
class id), but I do know that the export solved the problem. (At least
until one of my users bought a mac and another bought a pc with Vista
on it!)
Do you have a better way to do this...I'm open
Thanks,
|
| Post Reply
|
|
|
|
|
|
|
|
|
|