Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Easily send a file to another user Network
There must be an easier way to set this up, but I couldn't find one, so I made my own. My lovely wife often sits down at the Mac and browses the web, saving files on MY desktop. I don't know about you, but this drives me nuts -- I like things neat. So, how do you easily send files over to her account's desktop so you can be rid of them? I wrote an AppleScript and attached it to a folder on my Desktop called "Send to Shan's Desktop," which just moves the file to her drop box at /Users -> shan -> Public -> Drop Box. It looks like this:
on adding folder items to this_folder after receiving these_items
  tell application "Finder"
    move these_items to ¬
     (folder "Macintosh HD:Users:shan:Public:Drop Box")
    delete these_items
  end tell
end adding folder items to
Nothing complicated there. Obviously, chances are your wife's name is not Shan, so put your own wife's user name in its place. Next, while logged in to her user space, I created a folder on her Desktop called "From Mike's Side" which has this applescript attached to it:
on opening folder this_folder
  tell application "Finder"
    set folder_contents to name of every item of folder ¬
     ("Macintosh HD:Users:shan:Public:Drop Box")
    set the item_list to list folder ¬
     ("Macintosh HD:Users:shan:Public:Drop Box") without invisibles
    set numb_items to number of items in item_list
    repeat with i from 1 to numb_items
      set this_item to item i of folder_contents
      move file this_item of folder "Drop Box" of folder "Public" ¬
       of folder "shan" of folder "Users" of disk "Macintosh HD" to ¬
       (folder "Macintosh HD:Users:shan:Desktop:From Mike's Side")
    end repeat
  end tell
end opening folder
I did this because Shan, bless her heart, isn't much for navigating to her home folder, then opening her Public folder, then opening her Drop Box folder. By attaching this script to a convenient folder on the Desktop, it automatically moves files that I have transfered on my side to the folder on her desktop. A better way to do this must exist, I am sure, but I couldn't google one or find one here.
    •    
  • Currently 3.25 / 5
  You rated: 2 / 5 (4 votes cast)
 
[10,158 views]  

Easily send a file to another user | 20 comments | Create New Account
Click here to return to the 'Easily send a file to another user' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Change ownership?
Authored by: rhowell on Dec 22, '04 10:11:13AM
I wonder if there's an easy way to change the ownership of files using Applescript. The files your wife moves to her Desktop will still be owned by you, although she'll have read/write privileges for them. Considering you're a neat freak (so am I), this may be one extra step you'd like to carry out.

One quick and dirty way to do it is to copy the files to her Desktop from her Drop Box (she'll own the copies), and then delete the contents of the Drop Box.

[ Reply to This | # ]
JUST COPY THEM
Authored by: SOX on Dec 22, '04 03:12:34PM

instead of moving them. copy them (since you have read permission) and delete the originals (you have this permission in that folder). Now you own them.



[ Reply to This | # ]
use the builtin features first
Authored by: poetphilosopher on Dec 22, '04 10:25:53AM

Just curious - why don't you just enable "fast user switching" in the Login Options of the Accounts System Preferences. Then it would be relatively painless for your wife to switch to her account instead of using yours.

If additional "behavior modification" reinforcement is required, just set your Security preferences to "require password to wake this computer from sleep or screen saver"



[ Reply to This | # ]
Fast User Switching
Authored by: Bodoggy on Dec 22, '04 05:37:50PM

This is exactly what I do with my girlfriend and it works perfectly. Since I cannot trust her to be bothered to log in to her account when she wants to use the PowerBook, I just choose "Login Window..." from the Fast User Switching menu every time I leave the computer. This forces her to login to her own account if she sneaks onto the computer when I am away.

Even sneakier (and geekier) I also have Salling Clicker set up to execute an AppleScript that goes to the login window whenever I move out of range with my phone.

Don't get me wrong, she's a gem, I just don't want anyone messing with my mad obsessive-compulsive organisation skillz.



[ Reply to This | # ]
use the builtin features first
Authored by: mjmtaiwan on Dec 24, '04 12:35:50AM

I have fast user switching in use but I don't like having to go to the bother of typing in passwords and all that... their her files... let her deal with them I say!

---
Old Time Radio from the 30s, 40s and 50s



[ Reply to This | # ]
Easily send a file to another user
Authored by: macgruder on Dec 22, '04 10:32:31AM

Set group=admin write privileges to her desktop folder (or make a new group of you and her), make an alias of her desktop folder on your desktop, drag the files to that folder.



[ Reply to This | # ]
Easily send a file to another user
Authored by: cejones on Dec 22, '04 01:19:45PM

This is exactly what I did as well.. It is so much easier to simply have a folder on my desktop that I can drop her files into and have them show up on her desktop...

Why bother with clunky scripts to do this and then force wife to search in folders. If it isn't on the desktop, it does not exist for my wife.



[ Reply to This | # ]
Easily send a file to another user
Authored by: Azark on Dec 22, '04 10:32:43AM

I don't understand why the second script is better than an alias of the DropBox in her desktop?

---
iMac G5 1GB SD 10.3.7 /
G4 400 AGP 768MB 10.3.7 /
G4 400 AGP 768MB OSX Server 10.3.7



[ Reply to This | # ]
Easily send a file to another user
Authored by: johndburger on Dec 22, '04 12:30:37PM

Azark wrote:

> I don't understand why the second script is better than
> an alias of the DropBox in her desktop?

And I don't understand why the first script is better than an alias of her DropBox on =his= Desktop.



[ Reply to This | # ]
Easily send a file to another user
Authored by: macgruder on Dec 22, '04 12:33:35PM

Or as I suggested an alias of her desktop on his desktop :-)

(easier to do than all that applescripting)



[ Reply to This | # ]
Easily send a file to another user
Authored by: lullabud on Dec 22, '04 01:02:13PM

Permissions would be a problem with dropping directly to the other users Desktop, which is why somebody else suggested making a new group, adding both users to it and making the Her desktop owned by that group. Then it would work. With drop-boxes you don't need the extra tweaks because they're already writeable by everybody.



[ Reply to This | # ]
Easily send a file to another user
Authored by: macgruder on Dec 22, '04 01:05:58PM

Yes, that was me! Didn't want to repeat myself



[ Reply to This | # ]
Easily send a file to another user
Authored by: adrianm on Dec 22, '04 12:43:01PM
What I do, which requires none of this messing around, is set my/her default downloads folder to /Users/Shared/downloads and then have an alias to this on both mine and my wife's docks.

So it doesn't matter which account does the downloading... the files always end up in the same place.

[ Reply to This | # ]

Easily send a file to another user
Authored by: DavidRavenMoon on Dec 23, '04 10:44:02AM

My wife and I have our own logins... and she just hates being on my side! I have way too many things going on for her. So she always uses fast user switching to get to her desktop.

But when we want to send a file to one another, we use aliases of our drop boxes... mine on her desktop and hers on mine.

Works great.

As with many things on Mac OS X Hints, I see people reinventing the wheel fairly often. But the quality of their ingenuity is quite amazing! But sometimes people really make an easy thing complicated (like "I wrote a 15,000 word script to empty the trash...."). :)

---
G4/466, 1 GB, Mac OS X 10.3.7



[ Reply to This | # ]
script problem...
Authored by: chuloco on Dec 26, '04 08:13:23AM

"But sometimes people really make an easy thing complicated (like "I wrote a 15,000 word script to empty the trash...."). :)"

True, and sometimes people forget to make it work for everyone:

"Obviously, chances are your wife's name is not Shan, so put your own wife's user name in its place."

So I'm stuck not being able to use this hint, as even though I'm doing exactly as it says, I am getting an applescript error when I get to this step - for some reason it chokes when I enter "no value - not married". I need a script that works for boyfriends. I tried the obvious, but my boyfriend gets mad when I refer to him as my wife, and I don't know how to change the script to get around not having a wife. I had to give up after my boyfriend angrily refused to even discuss my getting a wife - he gave some silly reasons why I couldn't have one, and he won't admit it, but I think the real reason is he's just tired of me always wanting more stuff for my Mac.

I guess I'll wait until an alternative script shows up, or maybe by my birthday he will understand my needs, and I can get a wife.



[ Reply to This | # ]
Easily send a file to another user
Authored by: DavidRavenMoon on Dec 23, '04 10:48:34AM
Oh yeah.. I meant to add...

Obviously, chances are your wife's name is not Shan...

No, but it is Shani :)

---
G4/466, 1 GB, Mac OS X 10.3.7

[ Reply to This | # ]

Easily send a file to another, non-female, user
Authored by: dontlikehippies on Dec 25, '04 01:03:24PM

Argh! You must realize that you wouldn't have any such problems if you wouldn't share your pride and joy with your wife. Apple gave us all these security features and you go and give top secret info to the other side??? Some day people will learn.



[ Reply to This | # ]
Easily send a file to another, non-female, user
Authored by: DavidRavenMoon on Dec 27, '04 08:45:21AM

You shouldn't have secrets from your wife! Good relationships are built on trust. ;)

---
G4/466, 1 GB, Mac OS X 10.3.7



[ Reply to This | # ]
Easily send a file to another user
Authored by: jwoolson on Dec 25, '04 08:31:29PM

If you *trust* the other user(s) on your Mac, just set the r/w/x privileges on all the Desktop folders (or, if you REALLY trust them, ALL of the user subfolders) of each user can set to r/w/x.

Use BatCHMOD to change all the User folders to r/w/x. If you're comfortable with Terminal, use sudo chmod instead.

---
Jonathan Woolson
http://www.thinkplaydesign.com

[ Reply to This | # ]

Easily send a file to another user
Authored by: DavidRavenMoon on Dec 27, '04 08:43:27AM

Ironically the desktop folder seems to get its permissions set so everyone can access it quite often.

But no modification needs be done.... just put an alias of both drop-folders on the desktop... one coming, one going.

If you really want the items on the desktop, write a folder action for the incoming folder.

---
G4/466, 1 GB, Mac OS X 10.3.7



[ Reply to This | # ]