Move files by the name individually

I use this script at the moment to move correctly named items from one folder to another and also copies to another folder.
A) make a copy of the correctly named image and place in dropbox.
B) 'move' the correctly named image to a temp image folder.(as backup)
The problem is that other files arrive during the script between A and B as a result those files only get moved and do not get copied to the dropbox.
I need this script to get a list of the files of the folder then process those specific files.
Many thanks
Matt
here is the script
tell application "Finder"
          set this_folder to folder (((path to desktop folder) as text) & "Hotfolder")
  --set destination to folder (((path to pictures folder) as text) & "HotDestination")
          set DropBoxDestination to folder (((path to home folder) as text) & "Dropbox:Temp_Hotfolder")
          set LocalDestination to folder (((path to pictures folder) as text) & "TempHotFolder")
          duplicate (files of this_folder whose name does not start with "MJC_" and name does not start with "SH_" and name does not start with "ARK_" and name does not start with "5" and name does not start with "0" and name does not start with "Focus" and name does not start with "Untitled" and name does not start with "ZZ__5" and name does not start with "SE__5" and name does not start with "NN__5") to DropBoxDestination
          move (files of this_folder whose name does not start with "MJC_" and name does not start with "SH_" and name does not start with "ARK_" and name does not start with "5" and name does not start with "0" and name does not start with "Focus" and name does not start with "Untitled" and name does not start with "ZZ__5" and name does not start with "SE__5" and name does not start with "NN__5" and name does not start with "VM__5") to LocalDestination
end tell

To work with the same items, try getting a single list of files and then using that list for your commands, for example:
  set theFiles to (files of this_folder whose name does not start with "MJC_" and name does not start with "SH_" and name does not start with "ARK_" and name does not start with "5" and name does not start with "0" and name does not start with "Focus" and name does not start with "Untitled" and name does not start with "ZZ__5" and name does not start with "SE__5" and name does not start with "NN__5") as alias list
  duplicate theFiles to DropBoxDestination
  move theFiles to LocalDestination

Similar Messages

  • I need to create an action or script to save the file with the name of the selected layer

    I need to create an action or script to save the file with the name of the selected layer (not including the hidden layers, but including those visible).
    How could modify the script: 'Layer Comps To Files.jsx' to get the result?
    Warning: I do not need to export all layers as files.
    Who can help me?
    THX in advance

    Versione in Italiano (Further down the English version)
    NB - Nella versione inglese ho messo tutte le immagini dei menu in italiano.
    Versione per Mac, ma credo sia identico per Windows.
    Spiego passo passo cosa ho fatto:
    - Ho creato un file esempio con tre Livelli, salvato sulla scrivania e ho chiuso il file.
    - Ho aperto il file e selezionato il Livello al centro per iniziare a registrare una azione che ho chiamato: Save with Name of Selected Layer
    - Nuova azione
    - Dare il nome e premere Registra
    Ora salva…
    - Menu --> Livello --> Nuovo --> Livello... e premi -ok-, (lascia il nome che viene mostrato)
    - Ancora una volta Menu --> Livello... --> Nuovo --> Livello... e premi -ok-, (lascia il nome che viene mostrato)
    - Menu --> Livello --> Ordina --> Dietro
    - Menu --> Livello --> Unisci sotto
    - Menu --> Livello --> Unisci visibili
    - Menu --> Livello --> Nuovo --> Livello... e premi -ok-, (lascia il nome che viene mostrato)
    - Menu --> Livello - Nascondi Livello
    - Menu --> Elimina --> Elimina livelli nascosti (press -Yes-)
    - Menu --> Livello --> Nuovo --> Livello... Inserisci questo: 'Move this to the trash' e premi ok
    - Menu --> File --> Script --> Esporta Livelli in File... (Nella finestra che si apre scegliere l’opzione che si desidera, ma togliere il prefisso del nome) e premere -Esegui-
    - Selezionare il pannello Storia cliccare su Elimina premendo -Si- ogni volta che si apre la finestra di dialogo (Ripetere 8 volte questa operazione sino ad arrivare nella storia alla condizione di partenza. Ho visto che è meglio di Ripristina -F12-)
    - Fermare la registrazione.
    A questo punto, mandando in esecuzione questa Azione, ho raggiunto parzialmente l’obiettivo perché i file così creati mantengono, purtroppo, dei prefissi numerici per evitare probabilmente la sovrascrizione di file (credo senza avviso) nel posto dove vengono creati.
    Per ottenere l’obiettivo occorre un nuovo passo ed a proposito di questo riferisco quanto segue:
    ATTENZIONE - L’operazione descritta qui di seguito deve essere fatta su di una copia del file, per cui:
    - Duplicare il file,
    - Spostare l’originale in altra cartella
    - Lavorare sul file duplicato.
    mi riferisco a questo...
    ATTENZIONE - Questa modifica è effettuata a proprio rischio e pericolo ed il sottoscritto non si assume alcuna responsabilità su quanto venga fatto soprattutto da mani inesperte.
    ATTENZIONE - Questa modifica sovrascrive qualsiasi file che abbia nome uguale al layer che viene selezionato più l’estensione del file naturalmente.
    Comunque la modifica è banalissima e a portata di chiunque.
    Procedere così:
    - Chiudere Photoshop
    - Aprire (nel percorso specificato dall’immagine) il file “Export Layers to Files.jsx” (Export Layers To Files.jsx 1.0.0.16) con un editor di testo puro.
    - cercare la stringa (dovrebbe essere in riga 1029)
    var fileNameBody = fileNamePrefix;
    fileNameBody += "_" + zeroSuppress(i, 4);
    fileNameBody += "_" + layerName;
    - sostituirla con:
    var fileNameBody = fileNamePrefix;
    fileNameBody += layerName;
    - cercare la stringa (dovrebbe essere in riga 1047-46)
    var fileNameBody = fileNamePrefix;
    fileNameBody += "_" + zeroSuppress(i, 4) + "s";
    - sostituirla con:
    var fileNameBody = fileNamePrefix;
    fileNameBody += "";
    - salvare e uscire.
    - riavviare Photoshop
    - provare l’azione registrata facendo attenzione che il nome del layer non sia identico al nome di un file già presente altrimenti questo verrà sovrascritto.
    Domanda:
    Perché ho creato livelli che poi ho eliminato ecc.
    Risposta:
    Semplice per evitare errori di esecuzione delle azioni nel caso di operazioni con livelli mancanti o altro.
    Semplice... no?
    English version
    Mac version, but I think it's the same for Windows.
    First of all, I'm translating the actions that I made using the Italian version of Photoshop, you look at the position of the menu that I have chosen to do the work with other languages.
    I explain step by step what I did:
    - I created a sample file with three layers, saved to the desktop and I closed the file.
    - I opened the file and select the layer at the center to start recording an action that I called: Save with Name of the Selected Layer
    - New action
    - Give the name and press Save ( I think it is so in English )
    Now save ...
    - Menu -> Layer - > New —> Layer… and press -ok- , (leave the name that is shown)
    - Once again Menu -> Layer - > New —> Layer… and press -ok- , (leave the name that is shown)
    - Menu -> Layer - > Arrange (order) -> Behind
    - Menu -> Layer - > Merge Down
    - Menu -> Layer - > Merge Visible
    - Menu -> Layer - > New —> Layer… and press -ok- , (leave the name that is shown)
    - Menu -> Layer - Hide Layer
    - Menu - > Delete - > Delete hidden layers (press -Yes- )
    - Menu -> Layer - > New —> Layer… Enter this: ' Move this to the trash ' and press ok
    - Menu -> File - > Scripts -> Export Layers To Files... (In the window that opens select the option you want, but take away the name prefix) and press - Run -
    - Select the History panel and click Delete (on menu opened) pressing -Yes- every time when open the dialog box (8 times Repeat this step until you get into the story to the starting condition. Not use Restore -F12-).
    - Stop recording.
    At this point, by executing this action, I have reached the goal partly because the files created in this way remain, unfortunately, the numerical prefixes to avoid possibly overwriting of files (I think without notice) in the place where they are created.
    To achieve the goal we need a new step and thinking about this as follows:
    WARNING - The operation described below should be made on a copy of the file, so :
    - Duplicate the file
    - Move the original folder to another
    - Work on the duplicate file.
    WARNING - This modification is performed at your own risk and the undersigned assumes no responsibility on what is done mostly by inexperienced hands.
    WARNING - This change will overwrite any files with the same name as the selected layer plus the file extension of course.
    However, the change is trivial and within reach of anyone.
    Proceed as follows:
    - Close Photoshop
    - Open (in the specified path from the image ) file " Export Layers to Files.jsx " (Export Layers To Files.jsx 1.0.0.16) with a pure text editor.
    - Search for the string (should be in line 1029 )
    var = fileNameBody fileNamePrefix ;
    fileNameBody = + "_" + zeroSuppress (i, 4 ) ;
    fileNameBody + = "_ " + layerName ;
    - Replace it with :
    var = fileNameBody fileNamePrefix ;
    fileNameBody + = layerName ;
    - Search for the string (should be in line 1047-46 )
    var = fileNameBody fileNamePrefix ;
    fileNameBody + = "_ " + zeroSuppress (i, 4) + "s" ;
    - Replace it with :
    var = fileNameBody fileNamePrefix ;
    fileNameBody + = "";
    - Save and exit.
    - Restart Photoshop
    - Try the recorded Action, making sure that the layer name is not identical to the name of an existing file otherwise it will be overwritten.
    Question:
    Why I created levels which I then deleted etc..
    Answer:
    Simple to avoid errors of execution of the actions in the case of transactions with missing levels and other.
    Simple ... is not it?
    Sorry for my bad English...
    Thanks in advance for any hint.
    --->>> Please think about this... Adobe <<<---

  • I suddenly can't watch .mov files with the QuickTime Player x?

    I suddenly can't watch .mov files with the QuickTime Player x? There is always the message, i should look after new software! Can you help me?

    Handy-dandy cut and paste to the rescue!
    you need to install some other stuff to get the full file functionality back.
    Here's the list.
    Start with QT 7.6.6. - http://support.apple.com/kb/DL923
    Get Perian, and install it. - http://perian.org
    then VLC, - http://videolan.org
    DivX - http://divx.com - and the
    Flip4Mac package from Telestream - http://www.telestream.net/flip4mac/
    A52/AC3 downloader: https://www.macupdate.com/app/mac/21875/a52codec - In this installer package there is an audio A52Codec.component. DO NOT USE IT! Throw it out and use the one that is linked below.
    This is what I've put into my system and so far I've gotten every file to run fine, even my oldest videos.
    These are codecs you should see.
    In System/Library/QuickTime
         AppleIntermediateCodec.component
         AppleMPEG2Codec.component* (*optional if you've bought it)
         DivX Decoder.component
         Flip4Mac WMV Advanced.component
         Flip4Mac WMV Export.component
         Flip4Mac WMV Import.component
    In your Home/Library/QuickTime/
         AC3MovieImport.component (you may or may not want this component, in some instances it causes conflicts. In my system, it doesn't. Who knows why? I don't.)
         Perian.component
    For AC3 sound that is in most .mkv files, you need the A52Codec.component, this is the one you want, here: https://code.google.com/p/subler/downloads/detail?name=A52Codec.component.zip - unzip the file and put the component into the System/Library/Audio/Plug-ins/Components
    Go back to your Perian settings and in the Audio Output button, set it to 'Multi Channel Sound' - Ignore the message Perian puts up and select it.
    By doing a 'Get Info' on your files and where it says 'Open With' - default them to the QuickTime 7 program. Perian no longer will work with QuickTime Player so you must have QT 7.6.6 and set it so it is the default for all the filetypes you use.
    It works perfectly with QT7. So far I've gotten ALL my old videos to play.
    .avi, .mov (with the AC3 sound), .wmv, .flv, .mp4 and .m4v. all run fine as do all the older formats.
    Good luck!
    Deb.

  • Cannot move files to the trash bin

    Hello,
    I recently upgraded from Snow Leopard to Mountain Lion and have since also changed the administrator on our MacBook Pro. My account (formerly the admin) can no longer move files to the trash bin. My wife's account (now admin) has no problem doing so. When I try dragging a file to the trash I get "Finder wants to make changes, type the administrator's name and password to allow this."
    Not something I wan't to be doing every time. Please help.
    Thanks,
    the RouleauFamily

    Thanks for your reply. The permissions looked fine.
    Here is the fix I found at http://www.thexlab.com/faqs/trash.html which worked:
    If the affected account is:
    Then type the Terminal command:
    Your Admin account:
    sudo rm -ri ~/.Trash
    Another user account:
    sudo rm -ri /Users/user_name/.Trashwhere user_name is the short name of the affected account.
    Warmly,
    Olivier

  • After I import a movie file from the camera memory card, Imovie 10.0.1 acts as if the memory card is empty though I know it isn't.... I can't import that file to iMovie again.. is that the way it worksnow?  Thank you, Filippo

    On IMac 10.9  After I import a movie file from the camera memory card to Imovie 10.0.1 it acts as if the memory card is empty though I know it isn't.... I can't import that file to iMovie again.. is that the way it works now?  Anyone know?  Thanks, Filippo

    I would like to know this too. I imported a lot of files, then Imovie crashed. I went back in and they are not in imovie at all.
    I reconnected the camcorder to import again and though they are still on the camcorder, I no longer see them in the available list of files to import. I'm sure there is some sort of simple setting somewhere that reveals all files even if it thinks they are imported.
    Thanks

  • I also have a .csv file with the name of a jpeg in one column and a text description of each jpeg in a second column. Is there a way to automatically insert one jpeg (photo) and its corresponding text, each pair on one page, into a Indesign document?

    I also have a .csv file with the name of a jpeg in one column and a text description of each jpeg in a second column. Is there a way to automatically insert one jpeg (photo) and its corresponding text, each pair on one page, into a Indesign document?

    I would also recommend to write the description into the meta data. This would allow to place a text frame above the image and it is possible to add meta information and file name automatically together with the image, when you place it or even in a prepared template.
    Meta data information can be written easily in Bridge in the Meta File Workspace.

  • Macbook Pro won't let me move files to HD without authentication. Also when I try to move files from the HD to the desk it just copies them.

    My 2013 Macbook Pro running Mavericks 10.9.5 won't let me move files to the HD without authentication. So I have to keep putting my password in. Also when I try to move files from the HD to the desk it just copies them. This just suddenly happened last night. Anyone have any ideas what it could be? Thanks

    See http://support.apple.com/kb/HT1229?viewlocale=en_US - I doubt that it will solve your problem, though. You may want to post on the iPhoto forum - that's where all of the iPhoto experts hang out.
    Good luck,
    Clinton

  • I have the new version of iMovie, and when i try to start the program, i can't because it says that it is looking for some movie files from the Iphoto, so all the program is locked up... how can i do to restart the program??

    i have the new version of iMovie, and when i try to start the program, i can't because it says that it is looking for some movie files from the Iphoto, so all the program is locked up... how can i do to restart the program??

    Hi
    Did You ever use - iPhoto ?
    Did You may be direct iPhoto to a different Photo Library
    As iMovie tries to find the appropriate photo library - it can get lost if iPhoto direct it into a Library on a not connected external hard disk or to a strange location - And iMovie HANGS.
    Do - When no other program is running that might interfere
    • Start iPhoto - BUT NOW KEEP alt-key (option key) DOWN during the full Start-Up process
    • Now iPhoto let's You select Photo Library
    • Select the one in Your Account / Home folder / Pictures ! !
    • Then iPhoto should start up OK
    • Now Quit iPhoto
    • START iMovie
    Does it still hangs - then I would suspect - iMovie Pref. file
    If it Run's OK - Then HURRAY !
    Yours Bengt W

  • How do I generate the pdf file using the name of a field.  How can I help

    how do I generate the pdf file using the name of a field.  How can I help

    Hi,
    here's a sample.
    LiveCycle Blog: Formulare in bestimmte Verzeichnisse speichern und nach Inhalt aus Formularfeld benennen //Save forms to…

  • Downloading a pdf file, saving it, won't show the full name of the saving file when the name contains a space, stopping the file name.

    Downloading a pdf file, the name of the file contains a space in the middle of the file. The name showing on the 'Save' popup is the first few letters up to the space. Works fine on IE8. For instance, a file named "old snail_12345.pdf" would only show "old" (ignore the "s). This is on Firefox 30.0, WinXP Pro.

    Is this a problem when you are viewing the file in Firefox's built-in PDF Viewer and using its download button, or when you are using a download button in a web page?
    I've seen this problem occur when the server is pushing a different file name than the actual file name (for example, the file name is pdf.asp?id=12345 but the server is sending the name Annual Report.pdf in the headers sent with the file). I'm not aware of a workaround for the user, but for what it's worth, it is easy to fix on the server by replacing the spaces with %20 (the standard substitution used in web addresses).

  • Is there a way to Move files to the iCloud thus freeing up disk space on my Mac? Or does iCloud only sync (replicate) files between my Mac and the cloud?

    Is there a way to Move files to the iCloud thus freeing up disk space on my Mac? Or does iCloud only sync (replicate) files between my Mac and the cloud? I want to free up disk space on my Mac and assumed that the icloud would be a good way to do this, but having 'moved' 70Gb of files to the iCloud drive (I've upgraded to 200Gb storage) my Mac is still nearly full and I've realised that it seems to just Sync files just like dropbox.

    So, the big question is did the Apple guys confirm that this is how the new iCloud drive should be working?  I'm guessing, from your response, that this is indeed the case.  Are they going to fix this anytime soon?  I thought that this was a new function of the iCloud drive in Yosemite.
    I just want an online storage facility to back up my photo & music collections.  I did look at Dropbox as they have a good deal going with their Dropbox Pro, however this is still just a sync service where the Master files reside on your local disk drive - although I have read that there may be a way to work around this.  Still not ideal.

  • Found a swap file by the name ".bash_profile.swp"

    I am new to Mac and trying to figure out why my .bash_profile is not working. As I read suggestions, I try them. Here is my latest issue:
    E325: ATTENTION
    Found a swap file by the name ".bash_profile.swp"
    owned by: Brian dated: Fri Apr 10 22:09:01 2009
    file name: ~Brian/.bash_profile
    modified: YES
    user name: Brian host name: brian-principes-macbook.local
    process ID: 655
    While opening file ".bash_profile"
    (1) Another program may be editing the same file.
    If this is the case, be careful not to end up with two
    different instances of the same file when making changes.
    Quit, or continue with caution.
    (2) An edit session for this file crashed.
    If this is the case, use ":recover" or "vim -r .bash_profile"
    to recover the changes (see ":help recovery").
    If you did this already, delete the swap file ".bash_profile.swp"
    to avoid this message.
    Swap file ".bash_profile.swp" already exists!
    [O]pen Read-Only, (E)dit anyway, (R)ecover, (D)elete it, (Q)uit, (A)bort:
    Any suggestions?

    I am new to Mac and trying to figure out why my .bash_profile is not working. As I read suggestions, I try them. Here is my latest issue:
    E325: ATTENTION
    Found a swap file by the name ".bash_profile.swp"
    owned by: Brian dated: Fri Apr 10 22:09:01 2009
    file name: ~Brian/.bash_profile
    That is NOT a Mac thing, it is an Open Source Vim (which is often the default vi editor) thing. You will get this kind of behavior on any system when using Vim.
    You can get this for 2 reasons. First if you are actually editing this file from another terminal session. Second, if the previous Vim editing session terminated from unnatural causes.
    If you think it was from unnatural causes, then you select Recover. Save your changes :w and exit from the Vim :q
    The next time you launch Vim for that file the .swp file will still exist, but this time you can choose Delete, as you have saved your recovered work the previous session.
    If you are uncomfortable using vi/Vim editors, then may I suggest you try the nano editor. It will get the job done, but unlike Vim, nano is not as overloaded with features that take a long time to learn and master.

  • Safari 5.1 won't play .mov files using the embed tag

    Since upgrading to Lion (and Safari 5.1), any page that loads a .mov file using the <object><embed> tags gives me a "Plug-in Failure" error. If I take the HTML and load the same file using the <video> tag it works fine.
    Did Apple drop support for the embed tag? Is there something going on with my Quicktime plugin?
    Here is an example of a page with an embedded .mov:
    http://www.mediacollege.com/video/format/mpeg4/streaming/example.html
    Does this work for anyone running Safari 5.1 in Lion?

    please check to verify if you have the remains of plug-in attched to DivX and make sure you have installed quicktime plug-in by going to Safari -- Help -- Installed Plug-ins. If you ever uninstalled Divx without using Divxuninstaller, you'll meet this problem.
    Now download Divxinstaller.dmg and run it. Then you'll see the uninstaller in the corresponding application folder.
    Click uninstaller to fully uninstall Divx. Relaunch safari and enjoy!

  • Cannot transfer videos taken from my Canon camera(MOV files) to the iPad 4. They have previous with no problems at all. Is this an update issue?

    Cannot transfer videos taken from my Canon camera(MOV files) to the iPad 4. They have previous with no problems at all. Is this an update issue? I tried to sync them over using iTunes last night but it says that they cannot be played on the device. But they have previously

    1, you can't at the moment, though with iOS 5 in the Autumn, from http://www.apple.com/ios/ios5/features.html#photos :
    Even organize your photos in albums — right on your device
    2, by removing it from you synced from and re-syncing. Only photos taken with the iPad, copied to it via the camera connection kit, or saved from emails/websites etc can be deleted directly on the iPad (either via the trashcan icon in the top right corner if viewing the photo in full screen, or via the icon of the box with the arrow coming out of it in thumbnail view)
    3, the location of the photos that you synced to the iPad should be listed on the iPad's Photos tab when connected to your computer's iTunes.
    4, you can copy the photos from your iPad to your computer : http://support.apple.com/kb/HT4083 . You should also be able to delete them from the iPad as part of the transfer process to your computer, and it's then your choice whether to add them to your sync photo list so as to copy them back to the iPad. Copying them to your computer would allow you to organise them into folders and therefore be able to sync them back into separate albums.
    5, I don't use Dropbox either. There are some third-party browser apps in the iTunes App Store that allow you to download pages so that you can view them when offline e.g. Atomic Web (the whole page is saved within Atomic Web, it doesn't place a photo into the Photos app)
    6, deleting content should help. If you remove an app from your iPad then you also remove the content that it's got on the iPad - so if you then decide to reinstall it back onto the iPad then you will need to manually add back any content that you want in it. None of the Apple built-in apps (including Photos) can be removed from the iPad

  • I can not move files to the trash.

    I can not move files to the trash. When I drag the file to the trash it does not move, but it does appear in the trash and when I empty it, the file is erased. When I go back to my files, the file I just deleted is still there. I keep getting the "startup disk is full" message so I need to delete files, but I can't. Anyone know a solution to this?

    try getting a external drive such as a usb flash drive or a hard drive to transfer the files from the startup disk, and free up space.
    hope this helps!

Maybe you are looking for

  • Pattern swatches are shifting when exported to PDF and viewed in Preview/GoodReader

    I've tried for days to find an answer to this question, but haven't succeeded. Please also be aware that I'm a self-taught Adobe Creative Suite user. I'm working on a Mac with CS6. I work for a small publisher that produces knitting books. The proble

  • Mirroring on 2010 macbook air

    I have an upspecced 13" late 2010 macbook air. I have mountain lion installed. I am very dissapointed to find I can't mirror to my apple tv, the same goes for my 2010 macmini. Before I consider upgrading to new kit, do I have any options here? Any fi

  • Overview Missing Parts

    Hi All, In a production order there is an Overview for missing parts.  It has information like committed quantity and committed date.  We are looking for a standard SAP report that would give us this information by production order and material inste

  • Transparent Partion with three sources and one target- Need quick response

    I am creating transparent partion with three sources and one target.What will be the impact of this on retrieval and how can I improve retrieval. Thanks,

  • User Messages

    Hello experts In SAP BW or BI, is there any option to send a personal message to a particular user on the same server? i.e. through SAP?( not outlook or lotus) Full Points....!!!! cheers!!!!!