How do i get a list of file names in to a new folder?

Hi,
Does anyone know if there is a way of having a list of  image file names, searching for the images then putting them into a new folder?  I'm guessing it can probably be done through mac scripting but I know nothing about scripting and genreally not great with technogy so ideally need step by step instructions!!
If anyone can help I would really appreciate it!!
Ruth

Without details about your workflow and folder set up, I can only give you a generic script, but this should at least get us started.  test it and see what needs to be tweaked.
-- set paths to source and destination folders
set imageSourcePath to POSIX path of (choose folder with prompt "Choose a source folder.")
set destinationFolder to POSIX file POSIX path of (choose folder with prompt "Choose a destination folder.")
-- get file names from text file: assumes one name per line.
set fileNameTextFile to (choose file with prompt "Choose a file list text file." of type "public.plain-text")
set fileNames to paragraphs of (read fileNameTextFile)
repeat with thisFileName in fileNames
  -- replace each file name with an alias to that image file
          set contents of thisFileName to POSIX file (imageSourcePath & thisFileName)
end repeat
tell application "Finder"
  -- using 'duplicate' because I assume you want to make copies rather than move files
  duplicate fileNames to destinationFolder
end tell

Similar Messages

  • How can I get a list of database names from environment

    Hi,
    How can I get a list of database names from environment.
    I had found a method in JE API Docs named Environment.getDatabaseNames(), and i couldn't found the same method in Berkeley DB.
    I use java interface, is it supported?
    Thanks.

    Hello,
    I don't know if it would work for you, but have you checked the db_archive utility at:
    http://download.oracle.com/docs/cd/E17076_01/html/api_reference/C/db_archive.html
    Check the -s option.
    Thanks,
    Sandra

  • How should we get the out put file-name same as in put file-name in file to

    Hi frnds,
    having hundreds of files in the sender system with different names, how should we get the out put file-name  in the receiver system same as the in put file-name in file to file scenario ?
    Thanks in advance.
    truly,
    snrvakiti.

    Hi,
    In Receiver File Adapter you can set under 'Adapter-Specific Message Properties'
    check Use Adapter-Specific Message Properties
    check Fail on Missing Adapter Message Properties
    Check File Name
    Have a look at this link,  [File_to_File|http://allsapnetweavernotes.blogspot.com/2008/09/how-can-i-access-filename-from-fileftp.html]
    Regards,
    P.Rajesh

  • How do I get a list of files in the DataDrvUser Dir programatically (no dialogs)

    I have version 8.1.1292 of Diadem. I wish to get a list of files in a directory without using a dialog.

    Hello Sweeten
    Attached are two snipits of code, hope this helps
    The following sub reads all the folders in a root folder. Note the use the FSO or file system object. The FSO has a number of properties and methods for working with files and folders, would definetly check it out.
    Sub ReadProjects()
    'This sub reads all the Folders in the root
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set Folder = fso.Getfolder(RootPath_)
    Set Folder = Folder.SubFolders
    i=1
    For Each SubFolder In Folder
    LstStates.Items.add SubFolder.name,i
    i=i+1
    Next
    End Sub
    This next code snipit reads all the files of a certain extention (i.e. LPD,DAT)
    Sub ReadProjectFiles()
    Dim fso,PathName,LvdNames,GraNames,path
    Dim x,y,z
    x=1:y=1:z
    =1:w=1
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set Folder = fso.Getfolder(ProjectPath_)
    Set Files = Folder.Files
    For Each file In files
    Select Case file.type
    Case "LPD File"
    LstGraph.items.add file.name , x
    x=x+1
    Case "DAT File"
    LstData.Items.add file.name , y
    y = y+1
    Case "LVD File"
    LstView.Items.add file.name , z
    z = z+1
    End Select
    Next
    Let me know if this is helpful
    Tom Ferraro
    DIAdem Product Manager
    512-683-6841

  • How do I get a list of cameras names from MAX to use in a CVI app?

    I wish to avoid any confusion in selecting cameras to use in my CVI application, so I'm looking for a way, from within my app, to get the list of camera names as set up in MAX. Then I can populate a listbox and the user can choose their camera without having to guess or refer to an external listing for the MAX name. The selected name will then be passed to IMAQdxOpenCamera.
    Thanks!

    Found it! (Should have looked in the hardware boards first, but it seemed to be a software question.) Anyway, use IMAQdxEnumerateCameras.

  • How can I get a list of files in my collections?

    Hi
    I have been given a disc of 800 photos from a photographer, some colour and some black and white. I used lightroom's 'collections' facility to separate the photos into various groups ie: some pictures that had to be printed different sizes, some black and white etc etc.
    I now need to somehow 'export' a list of the files in the various collections for her to print.
    Does lightroom have a facilty where it can just export a list of files in text/doc format?
    Thank you for your help.

    We have used 2 Pantone colors In Indesign CS2. The One Pantone color is butt with other color slightly.
    Now we want to convert ps to pdf. The Particular place color not come properly while looking at pdf.
    Our customer want us to create ps to pdf not export pdf.
    Kindly do the needful.

  • How to create Dynamic Selection List containg file names of a directory?

    Hi,
    I need a Selection List with a Dynamic List of Values containing all file names of a particular directory (can change through the time).
    Basically, I need an Iterator over all file names in a directory, which could be used for Selection List in a JSF form.
    This iterator has nothing to do with a database, but should get the names directly from the file system (java.io.File).
    Can anybody tell me how to create such an iterator/selection list?
    I am working with JDeveloper 10.1.3.2, JSF and Business Services.
    Thank you,
    Igor

    Create a class like this:
    package list;
    import java.io.File;
    public class fileList {
        public fileList() {
        public String[] listFiles(){
        File dir = new File("c:/temp");
        String[] files = dir.list();
        for (int i = 0; i < files.length; i++)  {
                System.out.println(files);
    return files;
    Right click to create a data control from it.
    Then you can drag the return value of the listFiles method to a page and drop as a table for example.
    Also note that the Content Repository data control in 10.1.3.2 has the file system as a possible data source.

  • How can I get a list of the names of the failed steps ?

    Hi,
       I wanted to have a string which can describe all the failed steps. For example, if I had the steps below :
    Step 1
    Step 2
    Step 3, etc
    and Step 1 and Step 3 failed, how can I get a string " Step1, Step2" ?
    Can I somehow add a variable in each step which records the step result and then use all the variables at the end to creat a Result string ?
    Please help.
    ~Sam~

    Sam,
    you have at least two possibilities for your question:
    a) use the "SequencePostResultListEntry"-callback. You can check the "Step.Result.Status". If it is failed, you can copy the stepname into a string-variable which builds your "string"
    b) In the end of your MainSequence, just browse your ResultList for every step which has Result.Status as failed. Copy all stepnames into your string.
    Both methods require your station to record results, but since this is defaultsetting, there shouldn't be a problem.
    hope this helps,
    Norbert B.
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • How can i get message id as file name in Receiver Mail Adapter

    Hi All,
               We are working on file to mail scenario. Client requirement is " Attached file name should be the message id" How can we achieve this.
    Thanks & Regards,
    Purshothamm

    Hi,
    To have the file name as message id, I think the below blogs can help you…
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    /people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii
    Regards,
    Vijay N

  • How do I get a 'insert - hyperlink - file' to display in a new web page?

    When I insert the link to a downloadable file, that's fine.
    But I'm losing my eyeballs because iWeb uses the same webpage to open my downloadable file.
    The option to check, 'open in new web page' is not appearing.

    Welcome to the Apple Discussions. You need to first upload the file to your server and use the URL to the file at that location as the link to external page option of the Inspector/Link/Hyperlink pane. If the browser supports displaying the file type it will open in a new window.
    Click to view full size
    OT

  • Get a list of files from a folder

    Hi I would like to know how could I get a list of files containing into a folder on my computer using javafx... can anyone help?
    Thank you very much!
    Daniel

    I'll try that... i just want to list all videos containing into a folder intro grid =)
    i thought that had a special way using javafx
    Thanks
    Edited by: skul3r on Dec 19, 2008 6:47 AM

  • How to get a list of file paths for all files used in a project

    I have a project in Premiere Pro CC which has a large number of bins.  A sequence in one of these bins uses files from other bins.  I am trying to find the locations of all each of the files used  in the project.
    1)  Obviously I can select each clip in the timeline and show in finder, but there a lot of clips
    2) The video usage associated with each file in the project would help.  However
               1.  I haven't found a way to display only clips that have video useage if all of the bins have not been expanded.
              2.  Video usage  shows usage for all sequences, so one would have to manually check the pull down for each file to see if it is used in the sequence in question.
    3) I tried exporting the project to final cut pro xml.  The path url gives me the information that I need.  For some reason, however, when I do the export only one clip's information is there, not the information for all of the other clips in the project.
    4) I tired an export for speedgrade and all of the file names are there.  However the paths are not. 
    Basically I want to find all of the files in the project and relocate them to a specific folder for that project.  There's got to be a way to do this but I'm not seeing it ....

    Thanks for the suggestion concerning the file path.  And certainly it would have been nice to have done this before beginning.  However this is a project that has been around for quite a while, and the files have been moved into different bins.  And now the project sequence is being revised.
    So the problem is, worded slightly differently, how can I search all of the bins for the files that are used just by this sequence, ignoring the files which are used by other sequences?  Or, how can I get a list of the file paths of the files that are used in the sequence?

  • Hi ,How can I get a list of all laptops or users with folder direction enabled or offline files enabled, be it sccm or poerwshell . i have struggled for a week.

    Hi ,how can I get a list of all laptops or users with folder direction enabled or offline files enabled, be it sccm
    or poerwshell . i have struggled for a week
    tchocr

    Hi,
    There is no such PowerShell command can achiev this. Maybe you can use a script to get the user name with folder redirection enabled. However, I am not familiar with writing script, and it would be better for you to ask in script forum below for professional
    assistance:
    http://social.technet.microsoft.com/Forums/en-US/home?forum=ITCG&filter=alltypes&sort=lastpostdesc
    Best Regards,
    Mandy
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • How can I get a list of all laptops or users with folder direction enabled or offline files enabled, be it sccm or poerwshell . i have struggled for a week.

    How can I get a list of all laptops or users with folder direction enabled or offline files enabled, be it sccm or poerwshell . i have struggled for a week.

    Hi,
    There is no such PowerShell command can achiev this. Maybe you can use a script to get the user name with folder redirection enabled. However, I am not familiar with writing script, and it would be better for you to ask in script forum below for professional
    assistance:
    http://social.technet.microsoft.com/Forums/en-US/home?forum=ITCG&filter=alltypes&sort=lastpostdesc
    Best Regards,
    Mandy
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • How do I get a list of all missing files in a catalog in LR2?

    Is there an easy way to get a list of all missing files for the thumbnails in Lr2? I know the symbol that appears in the upper right corner of any particular photo that is missing its file, but how can I get a list of all such photos for an entire catalog (or at least big chunks of a catalog).
    Thanks.

    You can right click a folder and choose Synchronise - it has a Show Missing Files buttom.
    John

Maybe you are looking for