Copy Finder Items - how to generic for multiple user home directories?

I am creating an Automator workflow to allow my networked users to be able to copy certain files from a central location to their local home directory and overwriting their local copy. How to I make the destination of the Copy Finder Item to be generic home directory (something in the like of "~/Document/MegaSeg User Data/MegaSeg Database" instead of a fixed user home directory)?

Hi
It may be easier with an appleScript (which you could incorporate into an Automator action if you wanted).
--start script
set the_file to -- path to the file you want to copy goes here
set docs_folder to path to documents folder from user domain
tell application "Finder"
set target_folder to folder "MegaSeg Database" of folder "MegaSeg User Data" of docs_folder
duplicate the_file to target_folder with replacing
end tell
-- end script
This will replace existing files of the same name in the target folder. Hope it helps.

Similar Messages

  • SESSION VARIABLES : HOW TO TEST FOR MULTIPLE USERS

    I have a username session variable set up on a localhost testing envirnoment.
    This works fine for one user, but when I open another occurence of the browser (or just another tab) to test for multiple users the system overwrites the session variable with the last username input.
    So the question is:
             Why doesn't dreamweaver hold an instance of the session variable for each browser session? and if not what are your suggestions?
    Thanks
    Adam.

    Thanks for that.
    After scouring the internet I found the only way of running 2 instances of firefox  without them sharing the session variables is to create 2 new firefox profiles in windows + set the MOZ_NO_REMOTE environment variable.
    Internet explorer is much easier as it has a 'new session' option in the file menu, but seems to have more trouble displaying tables correctly.
    Hope this helps anyone with a similar problem.

  • How to configure Airport Extreme AFP disk sharing to host multiple users' home-directories (Lion, using autofs)

    I have this working, but only by completely bypassing access control, using guest access with read+write permissions.
    Do I need to buy Lion Server, to do this. All my past unix/linux experience says Lion Server should _not_ be necessary.
    This seems like a simple & obvious setup objective, but it is proving to be harder than I would imagine.
    Setup:
    multiple users, sharing two mac mini's running OSX Lion
    connected to an Airport Extreme (4th gen) with a USB disk shared (either via disk password, AEBS password, or using AEBS user's passwords).
    After much experimentation and web research, I finally have managed to get the mini's to auto mount the Airport Extreme's AFP shared USB disk. Well almost... It only works if, on the Airport, I set the guest access permissions to read+write and select the "Secure Shared Disks" method to "With disk password" or "with Airport Extreme password".  In other words, it only works if I essentially bypass/disable access control by using the guest authentication mechanism to the AFP shared disk.
    On the Lion side of this, I am automounting the users directories via "autofs". The config files for this are
    /etc/auto_master:
    # Automounter master map
    +auto_master            # Use directory service
    /net                    -hosts          -nobrowse,hidefromfinder,nosuid
    /home                   auto_home       -nobrowse,hidefromfinder
    /Network/Servers        -fstab
    /-                      -static
    /-                      auto_afp
    /etc/auto_afp:
    # Automounter AFP master map
    # https://discussions.apple.com/thread/3336384?start=0&tstart=0
    /afp/users -fstype=afp afp://;AUTH=No%20User%[email protected]/Users/
    Then, after rebooting and verifying read+write access to the /afp/users directories, I change each user's home directory: In System Preferences > System > Users & Groups, I right-click over the users to access the Advanced Options, changing the Home directory field to point at the AFP-mounted /afp/users/Users/* home directories.
    I experimented with alternate UAM specifications, as well as both OSX and AESB users & passwords. Using guest access is the only thing that has worked.
    Any pointers would be appreciated...

    Based on lots more experimentation which confirms the information in a parallel discussion (cf. Automount share as non ROOT or SYSTEM user! https://discussions.apple.com/thread/3221944), I have concluded that the Lion 10.7.2 implementation of AutoFS mechanism is broken. I submitted a bug report via apple.com/feedback.
    Work arounds..?
    Earlier I wondered if installing Lion OSX Server was necessary.  The more I contemplate this, the more I am convinced it _should_not_ be necessary. The client-server architecture is clear: my mac's are the file-server client's and the Airport Extreme is supposed to act as the file server. The only thing instaling Lion Server would do (besides enriching Apple.com) is enable me to configure one of the mac's as the file server. This would require it to be "always on" (thus enriching my electric utility as wel).  Okay, an additional benefit would be configuring software RAID disks attached to the Lion server, but Time Machine has worked fine for me in the past, backing up to disks mounted on the Airport Extreme.
    One solution is to create a disk partition for each user and instruct each user to connect / authenticate to the Airport Extreme AFP share at login.  The multiplicity of partitions is necessary since the first user to mount the AFP share, takes ownership of it, blocking other users from accessing that disk partition.  A user can "steal" ownership by reconnecting, but this will leave the other user's applications & open files dangling.
    This disfunctional situation really *****.  Before instaling Lion, I put a 64 GB SSD (solid state disk) in each of our mac's. I did this expecting to easily configure the /Users/* data on external networked storage. I'm having a dejavu "Bill Gates"-ware moment; problems like this were why I abandoned Windoz.
    I will make a few more experiments using the depreciated /etc/fstab mechanism.  Maybe that will bypass the broken-ness of AutoFS...? Alternately, I guess I could also try to run Kerberos authentication to bypass whatever is broken in AutoFS, but that would require a running a Kerberos daemon somewhere.  Possibly I could configure a Kerberos service to run on both my mac's (without installing Apple's Lion Server)...?
    Stay tuned...

  • Problem changing the location of multiple users home directories...

    I've just set up a new entry level model iMac for my Mum. Without getting into a discussion about the benefits or otherwise of doing so, I partitioned the hard disk into two with the first partition for the system and the second a scratch disk for files etc. I set up two users, one for my Mum and one for my younger brother. I then copied the users folder across to the scratch disk and in advanced options in the users list set each account's home folder to the relevant user on the scratch disk. This is the same set up as I have on my own system and with which I have no problems and which runs well and cleanly. I have only one account on my system. However on the iMac, the second user (my brother) is unable to write to the new home directory. Downloads don't work and preferences including right click for magic mouse, dock etc are forgotten instantly. It seems there's a permissions issue.
    I've set the machine up this way in order to keep all their files separate from the system after their last Mac got very bogged down. I expected it to work in exactly the same way as my own. Does anyone know how to successfuly set up both user accounts in this way?
    Any advice would be much appreciated...
    Message was edited by: Jimmy Hat
    Message was edited by: Jimmy Hat

    Jimmy Hat wrote:
    I've just set up a new entry level model iMac for my Mum. Without getting into a discussion about the benefits or otherwise of doing so,
    still not advisable though IMO.
    I partitioned the hard disk into two with the first partition for the system and the second a scratch disk for files etc. I set up two users, one for my Mum and one for my younger brother. I then copied the users folder across to the scratch disk and in advanced options in the users list set each account's home folder to the relevant user on the scratch disk. This is the same set up as I have on my own system and with which I have no problems and which runs well and cleanly. I have only one account on my system. However on the iMac, the second user (my brother) is unable to write to the new home directory. Downloads don't work and preferences including right click for magic mouse, dock etc are forgotten instantly. It seems there's a permissions issue.
    how exactly did you copy the home directories? did you do it using drag and drop in finder from one account? then the copied home directories both are owned by that account and the permissions need to be changed. please clarify if that's what you did.
    I've set the machine up this way in order to keep all their files separate from the system after their last Mac got very bogged down. I expected it to work in exactly the same way as my own. Does anyone know how to successfuly set up both user accounts in this way?
    Any advice would be much appreciated...
    Message was edited by: Jimmy Hat
    Message was edited by: Jimmy Hat

  • How to setup for multiple users accessing same share?

    Hi!
    Recently picked up Mac Mini Server and have some configuration questions related to sharing files & information over the internet. Whenever possible, prefer to use the built-in features & tools, not 3rd party tools.
    My setup & needs are this:
    - Have folders & sub-folders with files to share.
    - Wish to give individuals access to the shared folders, each with their own account (and access logging).
    - Shared folder and files should be visible via web to authenticated users only (so no special client or setup is needed).
    Right now, have added a Website via Server.app that points to the folder with files to share, and that works somewhat, but doesn't support individual user accounts separately?
    Thought maybe to setup VPN but that seems like massive overkill for this (and is a pain in the butt for non-technical users to setup).
    Editing httpd.conf for user support is a possibility, but seems /etc/apache2/httpd.conf only applies to the default web server (on port 80) not the one i set up in Server.app?
    Can anyone recommend the best approach, given the above needs?

    I have a related question. i created 2 websites/domains then i went to users and created 2 seperate "network" users then i went to ftp and selected each website and added only user A to site A and user B to site B. what's weird is that when i try to ftp using either of the users it seems to land on the same site. i looked at shared security for the folders and it only shows user a on site a folder and user b on site b folders. am i doing somehitng wrong or is this how it works in mountain lion server? i just want to give the domain owner ftp access so they can manage their files and only thier files. i also had to turn on open directory so that it would not create a local user but a network user. do i need to turn that off and just deal with having a bunch of local users as ftp user? i want to host multiple websites on the server and NO users remote on to server besides ftp.
    edit 1: i only have 1 IP running on the server which i don't think it has any affect on this but thought i mention it :-)
    edit 2: i just noticed one more thing that may help. i used filezilla to remote in using both users, one at a time. it seems to allow both users in but then it shows same directories. i then created a file using the one that was not supposed to have acces and it never sows up. but if i remote desktop to server i can see the new file in the correct folder. so it may have something to d o with the directory listing.

  • How to trace for multiple user sessions?

    Hello -
    I have a username from the app that has 7 connections to the database. What is the easiest way that I can run the 10046 trace event across all 7 sessions, and also name the trace files so they can be recognized in user_dump?
    Thanks in advance!

    Check what sid and serial# has session:
    select sid, serial# from sys.v_$session where ...
    start tracing session with:
    execute dbms_system.set_sql_trace_in_session(sid, serial#, true);
    stop tracing with
    execute dbms_system.set_sql_trace_in_session(sid, serial#, false);
    Look into udump directory for trace files:
    The default name for a trace files is INSTANCE_PID_ora_TRACEID.trc where:
    INSTANCE is the name of the Oracle instance,
    PID is the operating system process ID (V$PROCESS.OSPID); and
    TRACEID is a character string of your choosing.

  • Maximum file/folder size for Copy Finder Items?

    As I mentioned in another recent post, I used Automator a while back to set up a workflow that would Get Finder Items and then Copy Finder Items. Set it up as a iCal plugin. Worked fine for a long time, but I just checked and saw that the largest of the three folders (1.8 GB) was not being completely copied. The other two folders, much smaller (20 MB or so) were fine, but several folders within that large 1.8 GB folder were being skipped. I opened the workflow, and ran it, and it came up with an error that just told me to check the workflow. Is there a maximum size on this type of workflow? Seemed to work fine before . . .

    The *Copy Finder Items* action will not make duplicate copies. If you want multiple copies of the same item, you will need to rename or duplicate the item before copying, since the copy action doesn't have an option to rename, and the duplicate action doesn't duplicate to a different location.

  • Automator: Copy Finder Items Question

    Hola,
    Quick question about the Copy Finder Items action in automator: the "replace existing files" option, how is sameness determined? In other words, according to what criteria does Automator determine that two files are the same, and so eligible for replacement in the destination folder when that option is chosen? For example, would file Mydog.doc, modified 10/14/05, 230k be viewed as the same thing as Mydog.doc., modifided 2/21/06, 150k?
    Cheers,
    stu

    As far as the Finder is concerned, the comparison is based on file name only.
    It doesn't care about file size or modification date. If the name is the same the existing file will be replaced.

  • Automator Copy Finder Items - file couldn't be saved error

    I have a simple automator sequence that suddenly stopped working for no apparent reason.  Copy Finder Items has started returning an error "the file xxx couldn't be saved to the folder yyy"  Happens for different files and folders. Can't see anythng that's changed.  Any ideas?

    I'm currently having the same issue, and have had it with mulitple automator scripts on multiple computers, but it's not fixing itseltf. Anyone know what this error could be?
    I've noticed that I get the above error most often after getting and then correcting  permissions errors in the same workflow. Any help would be most appreciated.
    Thanks!

  • Copy Finder Items

    I have a workflow that is reading images names & pathways from a text file, and copying the images in the text file into another folder. My problem is coming with the "Copy Finder Items" action. If I have the same image that I want copied into the folder, it will only copy it once. Actually, when I run the workflow, all of the images appear in the results section of the copy finder items. However, any duplicate images are not actually in the folder that it is copied to. Is there any way to correct for this, so that I can copy an image into a folder more than one time?
    Thanks

    The *Copy Finder Items* action will not make duplicate copies. If you want multiple copies of the same item, you will need to rename or duplicate the item before copying, since the copy action doesn't have an option to rename, and the duplicate action doesn't duplicate to a different location.

  • Copying Finder items into same folder as Action

    I want an Action that can copy Finder items directly into the same folder the Action resides in, i.e. without specifying where or asking the user where.
    Is this possible? All I've been able to create so far is an Action whereby I need to specify the folder or get the user to specify it.

    OK, I am now going to try to teach you to fish
    It might be a little bit easier to visualize if you think of the values passed along in your workflow as a stack of playing cards. Some actions do something with the cards and then just pass them on, some take all of the cards, and others add cards to the stack. The Set Value of Variable action takes the current stack of cards (the results of any previous action(s)), assigns it to a variable that is named whatever you want to name it, and passes the stack on to the next action. The Get Value of Variable gets the value of one of your previously named variables and adds it to the stack. You can also use a previously named variable in input fields of various actions, such as locations to copy to. I'm not sure why you are getting the path to the desktop (unless that is where your workflow application is located), but here are some additional comments for my previously posted workflow:
    1) Run Applescript (with the Applescript posted earlier)
    - if your workflow has been saved as an application, the results of this action will be a path to the folder that it is in (if not, the path will be to where the Automator application is, which isn't what you want)
    2) Set Value of Variable
    - this action will take that path, assign it to a variable with your specified name, and pass it on
    3) New Folder
    - this action makes a folder with the specified name in the specified location - you can drag variables into these fields, in which case their current values are what will be used
    - the result of this action is a new folder, and the path to the folder is added to the current stack of cards (if any) and passed on to the next action
    - since we just want the path to the new folder (and none of the previous cards), first we throw away any cards we may have (with the "ignore input" option) so that our results don't get mixed up.
    4) Set Value of Variable
    - same as (2) above, except that the value is now the path to the folder that got made in the previous action (3)
    5) Ask for Finder Items (Type: files, Allow Multiple Selection)
    - the results of this action will be whatever items you selected, and of course, they will be added to our current stack of cards unless we throw them away first with the "ignore input" option
    6) Copy Finder Items
    - this will copy Finder items (the ones we selected in the previous action) to the location that is specified - you can drag a variable into the To: field, in which case it's current value is what will be used.
    - the result of this action will be the paths to the items that were just copied, but since this is the end of the workflow it doesn't matter
    You can use the View Results action to see what the current stack of cards is, so you can see if what is going in and coming out of your actions is what you expect, and tweak accordingly.

  • Can't use "Copy Finder Items" after "Run Workflow"

    Create a simple Automator workflow:
    Set just 1 action "Create Thumbnail Images" and save it. I called it "wf1.workflow".
    Now create the second workflow with 3 actions:
    "Get Specified Finder Items" action (choose an image file here).
    ->
    "Run Workflow" action (specify "wf1.workflow" as a workflow, select "Return workflow results", check "Wait for workflow to finish").
    ->
    "Copy Finder Items" (specify any location)
    Now run the workflow. Everytime I get an error.
    The log:
    Get Specified Finder Items completed;
    Run Workflow (wf1) completed;
    Copy Finder Items failed
    * -[NSAppleEventDescriptor count]: unrecognized selector sent to instance 0x113185d0
    The same workflow works fine in Tiger, so I think there is a bug in Leopard Automator.
    Am I right? Is there any workaround?

    I can confirm I got the same results for the workflow, just don't know why as of yet. And then I somehow got it to work.
    I checked the results for each action and they didn't seem unusual. The results of "Get Specified Finder Items" is a single parenthesized text string representing the file's path. The results of "Copy Finder Items" is an alias, but that should be okay.
    So, deleted the thumbnail from the first run, and then ran the workflow again. It got stuck on "Run Workflow" and hung for a while. So I stopped it and removed "Run Workflow", and then added it in again. Presto! It worked, sort of. It didn't copy the thumbnail, instead it copied the original file. I'd forgotten to reset it to "Return workflow results". So, it seems to be something to do with returning the workflow results instead of the action input.
    I'm going to do some more testing.

  • Automator 2.2 "Copy Finder Items" Action Error

    Hello all,
    When I try to create an Automator workflow that finds a type of file (pdf) in a nested folder structure and copies those files to another folder - essentially extracting the pdfs from their nested folders - I get an error message.
    1) I use the "find Finder items" action. I specify the top-level folder and set the kind to "document"
    2) It returns 56 items
    3) I use "copy Finder items" action and specify a new folder
    4) The copy action fails stating that a given file "couldn't be saved in the folder". It does not always error-out on the same file. Changing or creating a new folder doesn't help.
    I have tried this under two user accounts with the same result. I have tried deleting preferences. The same error results.
    Any ideas?
    I am running 10.7.1 on a 15" MacBook Pro, early 2011.

    I was having the same issue.
    I found another solution: instead of copying files, you could move files.
    1) Duplicate your original folder (unless you want to move/extract your files entirely to the new folder) (right click the folder and select duplicate)
    2) Create a new folder as the destiny folder
    3) Open automator and use the following actions (in order) on the workflow
    - Find Finder Itens (browse to your source folder; select "any"; select "extension"; select "end with"; type "pdf") (you can do the same thing with the actions "get specified finder items" combined with "filter finder items")
    - Get Folder Contents (and mark repeat for each subfolder found) (use this action if you have subfolders)
    - Move Finder Itens (browse to your destination folder, that you created previously)
    Now you can delete the duplicated folder.

  • Help with what should be an easy workflow.. copy finder item

    Hello,
    I am writing a workflow to backup a folder to an external hard drive. The flow first copies the folder to the desktop, then re-names it with the date and then should be copying it to an external fire-wire hard drive.
    The problem is that the "copy finder item" does not work - only the last sub-folder in the folder actually gets copied. I can't figure out what the problem is. This seems to affect both the copy to the desktop and then the subsequent copy to the firewire drive. Puzzlingly, it sometimes seems to work and copy the whole folder!
    Any advice?
    Jonathan

    Well, I don't know what's causing your problem, but let me suggest an optimization. Unless you have a specific reason to want this, there's absolutely no reason to copy the folder twice. Right now, you're copying to the desktop, renaming the folder, then copying to the external drive. Presumably, you must at some point delete the copy on the desktop. Copying twice means the backup will be half as fast as it could be. It also introduces extra room for errors by increasing the complexity of the task.
    Instead, copy the folder to the destination on the external drive, then rename it once it's there. Perhaps, if you're lucky, in making this change, your problem will solve itself.

  • How to use the same POWL query for multiple users

    Hello,
    I have defined a POWL query which executes properly. But if I map the same POWL query to 2 portal users and the 2 portal users try to access the same page simultaneously then it gives an error message to one of the users that
    "Query 'ABC' is already open in another session."
    where 'ABC' is the query name.
    Can you please tell me how to use the same POWL query for multiple users ?
    A fast reply would be highly appreciated.
    Thanks and Regards,
    Sandhya

    Batch processing usually involves using actions you have recorded.  In Action you can insert Path that can be used during processing documents.  Path have some size so you may want to only process document that have the same size.  Look in the Actions Palette fly-out menu for insert path.  It inserts|records the current document work path into the action being worked on and when the action is played it inserts the path into the document as the current work path..

Maybe you are looking for

  • Free Busy information not appearing correctly in Outlook

    First some background: For two of our Resource Mailboxes, we are having an issue where all times are showing outside of Work Hours (gray). The working hours for both of these rooms are set for 8-5, pst, just like all our other Resource Calendars. Thi

  • Select-options in dynpro

    Hi expert, I maked a modul pool ( se80 ) and i maked a dynpro. In this dynpro i putted a Input/Output field. It's run ok, but I would change it in select-options and not a simply I/O field. It's possible ? How ? Tks a lot, bye. <LOCKED BY MODERATOR -

  • Creating Logical Hostname Resource - Resource contains invalid hostnames

    I am desperately trying to create a shared ip address that my two-node zone cluster will utilize for a failover application. I have added the hostname/ip address pair to /etc/hosts and /etc/inet/ipnodes on both global nodes as well as within each zon

  • Z10 loses signal during a call

    I have a issue with loss of signal during a call on my z10. When the automatic mail checking enabled and during a call mail is checked, I hear snatches of words and communication break, look at the screen see the message "network is busy" and zero si

  • AirPlay Mirroring shows scrambled output in guest account

    When using Mountain Lion's AirPlay Mirroring in the guest account, all I see on an Apple TV is some flickering scrambled image. The same issue is observed by one other user on the Net. The reponse by another user is as follows.. "To be more precise: