RE: how to check for file in the user's Documents
RE: how to check for file in the user's Documents
- Subject: RE: how to check for file in the user's Documents
- From: "Ann K. Blombach" <email@hidden>
- Date: Sat, 28 Jul 2012 18:47:45 -0400
Thanks for the suggestion. I actually realized this morning that I could do
that, and it did indeed solve the problem.
But now I have a new problem. I really want to create a work folder in the
user's Documents, but I end up with a folder that won't allow the user to
write to the files in that folder, which is useless for what's supposed to
be the user's work folder. The "system" has read/write privileges, and
that's it. (Yes, I know the user *should* be able to set up his/her own
work folder, but many of our users can't--if the installer can do it for
them, it cuts down a LOT on our tech support workload.)
I tried doing it two different ways with a script:
mkdir -m=rwxr-xr-x /${HOME}/Documents/"AppName Work Folder" and that
produces a folder that isn't openable or readable by anyone.
mkdir -m=rwxrwxrwxr /${HOME}/Documents/"AppName Work Folder" and that
produces the folder that only the "system" can read and write to.
I was able to use Packages (I assume that's yours, Stephane--in which case,
thanks you!) to set up a usable work folder in the Users/Shared folder, but
I fear with our users, that won't be of any use at all because they'll never
understand how to find that folder. And my script doesn't work any better
with Packages than it worked with PackageMaker.
Any help would be greatly appreciated.
Thanks,
Ann
-----Original Message-----
From: Stephane Sudre [mailto:email@hidden]
Sent: Saturday, July 28, 2012 4:30 PM
To: Ann K. Blombach
Cc: email@hidden
Subject: Re: how to check for file in the user's Documents
Interesting challenge from the "File exists" (JavaScript) point of view.
An alternate solution would be to use a shell script requirement (simple if
[ -f ]; blah blah fi script) to check for the existence of
~/Documents/thefile.
On Fri, Jul 27, 2012 at 9:08 AM, Ann K. Blombach <email@hidden> wrote:
> My installer needs to check to see whether a file is already in the
> user's Documents folder. How do I specify the Directory of the user's
> Documents folder? ${HOME}/Documents works fine for unix commands, but
> not in PackageMaker using the "File exists on Target" requirement, but
> I don't know how to specify the target) or Perl (searching for a file,
> but I need to know how to specify the Directory). All I need is the
> magic syntax that will do the same thing ${HOME}/Documents does in
> unix. Doesn't matter whether it's in PackageMaker or in Perl. Thanks.
--
Packaging Resources - http://s.sudre.free.fr/Packaging.html
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden