Path of the most recent added file using applescript

I use appleScript Automator to download new pictures on my Instagram.

The script trigger when the new file is added to a folder "updates".

Open the app (work)

activate an application "Uploader HD for Instagram"

delay 0.5

Tell application "system events".

say "Uploader HD for Instagram" processes

Click on the menu "open...". "the menu 1 menu bar item 'File' from the menu bar 1

tell the end

tell the end

Activate the "go in the folder" CMD + SHIFT + G

Tell application "system events".

delay 1

combination of keys 'G' using {control down, moving down}

delay 1

tell the end

This is the problem... I "Don't KNOW" the name of the most recent added the file and there are a lot of files on the folder... So I can't use the full path of the file on the 'go in the folder ".

Tell application "system events".

combination of keys "/ Users/HazaelDiaz/Google Drive/IFTTT/Instagram/update/2016 / '.

delay of 0.1

strike back

delay of 0.1

strike back

tell the end

Since I trigger the 'applescrip' using the 'Workflow folder action... " Is it possible that I can get the value or the path of the new file included?

I found a code that renames all the files from 0 to xxx folder action, but the new included file is always the last of them on digital process... is possible to rename the files and give the new file name "update1.jpg" first?

Also I can order "Go to folder" action must seek that specify the file: 'update1.jpg. '

This is the script name change: (BTW, these scripts always ask me to select folder... and what I want is to be automated out of my interaction with but do not know how to change so it will always use the "updates" folder

Tell application "Finder".

a in each file of the entire contents of the value (choose the folder)

Repeat with aa in one

the file_name my MakeBase (aa AsString) value

If file_name is not 'JUMP' then

count_er Set 1

the value all_files (all files in aa)

Repeat the operation with ff in all_files

the name value of ff ((texte-3-1 par le biais de ("000" & (count_er as string))) & "." & (name extension for ff))

Set count_er to count_er + 1

end repeat

end if

end repeat

tell the end

to MakeBase (txt)

the value astid delimiters to point to the text of the AppleScript

the text value of the point AppleScript delimiters «:»

the value for each item of text txt new_Name_Raw

the text value of point AppleScript delimiters to "_".

the value final_Name for each item in new_Name_Raw text text

the text value of the point AppleScript astid delimiters

If length > 251 of final_Name then set final_Name on 'SKIP' - will be more than 4 characters for counter

return final_Name

end MakeBase

Any help will be much appreciated.

Thanks /.

What version of Mac OS X are you running?

Tags: Mac OS & System Software

Similar Questions

  • How can I merge two catalogues, preserving the most recent changed files in each catalog?

    I have a catalog covering the modified and modified files covering a period of time until the end of 2013.  I have an another catalog covering the same period and the most recent files at the present time.  The first changed files that have been made in a way not forward (the files were, but not mods) when I switched to a new machine and subsequently more photos for 2014 adds to the existing batch.  I had never used XMPs to store the mods - my mistake, now corrected for the future.  Is it possible to merge a catalog in another or both in a new catalog and keep the latest mods for all files?  If not, can I export the changed files in a catalog, and then import them in the most recent two catalogues with all the included files?

    I think that I found the definitive answer, in The Adobe Photoshop Lightroom book, the chapter on the merger of two catalogs into one. The trick is to create a new master catalog that starts in white, shoot in the first catalog (does not move the files), then it repeats with the second catalogue, which will search for and avoid the dupes, yet once again move the files.  The end result is a catalog of master handset, with files and all changes for all files in the two catalogues.  It worked for me.  Thank you, you were thinking in the right direction.

  • I have Mac OS 10.4.11 and Firefox. He says want to update to the most recent I have used but erased my old version and said I can't launch a new. How can I get old one back?

    Downloaded and asked if I wanted to replace my current version, which I did. Then when I tried to open Firefox, it said that I could not use this version. I guess my old version has been crushed. When I go to the Mozilla page, it does not can I download anything that is compatible with my operating system. Is there a way to get an older version?

    From Firefox 4, Mac must have an Intel x 86 processor (that you have) and OSX 10.5 or higher (you don't).

    The good news is that Firefox 3.6.x supports even OSX 10.4 and Mac with Mac PPC or Intel architecture. The bad news is that the support for Firefox 3.6.x series is likely to end in the first half of 2012.

    Updating your OS x 10.5 or newer will allow you to use Firefox 10.

    If this answer solved your problem, please click 'Solved It' next to this response when connected to the forum.

  • How to turn off the most recent list used to term & other apps

    were if you search the registry problem disable MRU in all applications, especially the run command on the start menu, but I would like to eliminate all the other apps as well

    I found several solutions including one that mentions comdlg32, others who need to add fields to the register, any other fair value dword

    Is there a single solution or do I need a combination of solutions

    I didn't do this, but here I found at least 5 versions, one of which is correct & universal
    :
    1. [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Comdlg32]
    "NoFileMru" = DWORD: 00000001

    2.HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
    Value name: NoRecentDocsMenu
    Value type: REG_DWORD
    Value data: 0 or 1
    0 = Yes, allow these recent docs
    1 = no, do not allow any recent docs

    Value name: ClearRecentDocsOnExit
    Value type: REG_DWORD
    Value data: 0 or 1
    0 = no does not clear
    1 = Yes, clearly their

    Value name: NoRecentDocsHistory
    Value type: REG_DWORD
    Value data: 0 or 1
    0 = historic Yes
    1 = no history

    3 turn off the history:
    Click Start--> Run--> type "regedit" in the Run dialog box.
    When in the registry, locate the following key:
    HKEY_CURRENT_USER > Software > Microsoft > Windows > CurrentVersion > Explorer > RunMRU.
    Right click on the RunMRU key and choose "Permissions."... ».
    Click on "Add..." ».
    Type "Everyone" and click OK in the box that opens.
    In the permissions (security) dialog box, select all and then deny read access.
    Click OK.
    Close the registry editor. You may need to restart your computer for the changes to take effect

    ' 4 ' most recently used ' list - how to disable file
    Previous

    The information in this article applies to:

    WinWay RESUME 9.0 and versions later

    Summary

    Like many other Windows applications, the menu 'File' of WinWay RESUME luxury offers easy access to read files recently. This article explains how to remove this list.
    More information

    Windows offers a system policy to disable the file 'most recently used' lists for applications in accordance with this particular policy standard.
    To turn off the "most recently used" list of files, download and run this file.
    To restore the list, download and run this file.

    Notes:

    This setting affects several applications, not only WinWay RESUME
    This setting applies only to the user currently logged on to the computer. You can repeat these steps for the other connections if necessary

    For advanced users

    The parameters above can be entered through the Publisher of the registry as well.

    Select Start, run, Reg Edit
    Navigate to this registry key:
    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
    To disable the "recently used file list", adds the value:

    Name: NoRecentDocsHistory
    Type: DWORD
    Value: 1

    To activate the "recently used file list", right-click on the 'NoRecentDocsHistory' and select 'delete '.

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion \Policies\Comdlg32 key. 2. create a REG_DWORD value called NoFileMru and set the value to 1.

    5.
    Type regedit in the box RUN, and then press ENTER. It will open the registry editor.

    2. now go to following keys successively:

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer
    HKEY_USERS\.default\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer

    In the right pane, look for a DWORD 'ClearRecentDocsOnExit '. Its value could be set to 1. Set its value to 0 or delete it completely.

    The recent documents menu can be disabled easily by editing the registry. To do this, go to the following key:
    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
    Now in the right pane, create a new DWORD with the name: NoRecentDocsMenu and set its value to 1. Restart the browser to save the changes.
    You can also clear the RUN MRU history. All ads are stored in the key:
    HKEY_USERS\. Default\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU
    You can remove individual entries or the entire list. To remove history to find inscriptions date on:
    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Doc find Spec MRU and delete.

  • Backup utility Windows 7 application ' are you sure you want to remove the most recent data from the backup file "even if I'm trying to remove the backup set is not the most recent.

    I'm trying to reduce the amount of space that my Windows 7 backup uses so I've come to the place in Windows 7 backup:
    Manage space > view backups...

    I am then presented a list of three backup sets:
    01/03/2012 to 01/04/2012
    12/07/2011 to 12/21/2011
    23/11/2011 to 30/11/2011

    I would like to remove the older two, leaving the most recent. However, this doesn't seem to work as expected. If I try to delete one of the two most recent ones (the first two in the list above) I get the following warning "Are you sure you want to delete this backup file.

    However, if I try to delete the last one in the list, I get a slightly different error "Are you sure you want to remove the most recent data of the file backup?"-sounds strange because it is clearly not the most recent backup according to the dates it's show.

    Of course, I can go ahead and ignore the warnings, but I fear that maybe there are some files in the last backup the value in the list that may not be right more recent set backs.

    In 2011, I thought this might be something wrong with the date formats vs US UK (I am in England so the above dates are in dd/mm/yyyy format and not in jj/mm/aaaa) - but now it's 2012 and I backup from 2012 and 2011 games and he always seems to think that the oldest backup of 2011 is the most recent.

    Any ideas? Can I delete the oldest backup sets (that is, the two that are from 2011) safely?

    Any help much appreciated - thank you.

    Simon

    Update: I checked on other PCs in the office and the situation is the same - is not only something strange on a PC.

  • try to follow the tutorial of Muse to apply a store online, downloaded lesson files will not open, but an alert says my version of Muse needs update. The function of update in Muse said that my version is the most recent; 2014.3

    try to follow the tutorial of Muse to apply a store online, downloaded lesson files will not open, but an alert says my version of Muse needs update. The function of update in Muse said that my version is the most recent; 2014.3!

    I expect that you use OS X 10.8 or earlier? Muse 2015.0 and later requires OS X 10.9 or higher.

  • I have 12 items. I just downloaded the most recent update. It will not open the RAW files from my Panasonic TZ70?

    I have 12 items. I just downloaded the most recent update. It will not open the RAW files from my Panasonic TZ70?

    See the faq for the compatibility of ACR:

    FAQ: Photoshop Elements will work with my camera, or why does not open my raw files?

    Your camera would need ACR version 9 which is not supported by 12 elements.

    You can:

    -upgrade to 13 items, with updates of version 13.1.1

    - or use the free DNGconverter mentionned in the links at the bottom of this faq. You'll be able set of entire folders to convert your raw files to DNG PSE12 can read and modify.

  • Failed to sync files - missing the most recent version of the file

    I have two files in the cloud: my Lightroom Catalog and previews file support and work between my desktop and laptop. I have not opened the file LR catalog of the workstation from the 3/10, but have used in on my laptop at all times. After you install the updates today, he asked me to sign the creative cloud, which I did. When I look at my creative cloud file, my two files had been replaced by the OLD version of the file on the desktop, changed the 3/10. The most recent version, current disappeared that I worked for a month. None of the work I did on Lightroom, hours and hours, no longer appears. Please help me find the latest version of my file!

    Also: it does not appear on the files "Archived" on my account. The last archived version was 3/10. If the file I used for the past month, never synced to the cloud, why it has been replaced by an older version of the file?

    With the recent update of the application of Creative Cloud Desktop (1.9.1.474), we have unfortunately introduced a bug that causes the creation of a new Creative Cloud Files folder and re-synchronization of all content. This will happen only the first time that the synchronization application runs after the update. This caused an understandable pain and confusion, for which we really apologize.

    Creative application Cloud Files contains a logic that supports the use of several Adobe ID. This allows to disconnect from an ID and in, but keeps the contents of your separate creative cloud. When you sign out and change identifiers, the app moves the previous creative Cloud Files folder and it's content and he adds with the already signed in ID (User@AdobeID). Then, it creates a main folder and begins to synchronize the content of the identification of new.

    The bug I mentioned earlier occurs, as the app believes an ID selector took place and as such, moves the current record of Creative Cloud Files and attempts to annex the already signed in ID. As no switch actually took place, it manifests as (unknown).  The application then creates a main folder to synchronize the data.

    What you end up with is essentially a creative Cloud Files folder with your new synchronized data and a creative Cloud Files (unknown) folder that contains duplicate data.

    This happens once, after the last update.

    The solution is to simply delete the (unknown) Creative Cloud Files folder.

    I recommend that ensure you that you have no pending change you can do offline and you check the contents of the folder new, main designer Cloud Files contains everything you expect of him.  If this is not the case, check the contents of the creative Cloud files (unknown).

    If there is still an incompatibility with your data, you can check on creative.adobe.com to confirm that your data is there.

    If you have any other problems or questions on this topic please email [email protected]

  • Any idea when GTX 970 will be added to the list in charge in the most recent version of first? ID like my cuda.

    Any idea when GTX 970 will be added to the list in charge in the most recent version of first? ID like my cuda.

    Should work now... for CS5 or 6 there was a hack http://forums.adobe.com/thread/629557

    For later versions, my understanding is that as long as the card has at least 1Gig vram you need, you can use Cuda

  • Try to add a page to a pages document. It worked until now but just finished page 13 with text and photos and cannot add another page, using macbook pro with El Capitan and the most recent version of the Pages.

    Try to add a page to a pages document. It worked until now but just finished page 13 with text and photos and cannot add another page, using macbook pro with El Capitan and the most recent version of the Pages.

    You have placed your beam to insert at the end of your text on page 13 and then apply Insert menu: Page Break? In the v5.6.2, Pages I just add a new page to a section of four pages to this approach.

  • Sometimes, I get a notice from a site that Firefox needs an update. When I go into FIrefox, it says that I use the most recent version. What is happening?

    I wonder if these sites are trying to make me download malware or virus. If I go to the Firefox site and it says that I use the most recent version, I think Mozilla tells me and wonder "why a site told me that I have to update? I hope only that Mozilla and not blindly download something without studying. Am I paranoid?

    No, it's a scam which is the link to the site, mozilla does not use a site to ask you to update, it uses an automatic update.

    You can report it here

  • Why used iTunes 10.2.1 (the most recent a necessary at the start of my iphone) load on my Vista computer?

    Why used itunes 10.2.1 (the most recent a necessary at the start of my iphone) onto my computer?

    Hello

    Follow the information from apple to the link below

    Remove and reinstall iTunes, QuickTime, and other software components for Windows Vista or Windows 7

    http://support.Apple.com/kb/HT1923

    and or ask for their support of itunes

    http://www.Apple.com/support/iTunes/

    Also try the discussions of apple itunes

    http://discussions.Apple.com/category.jspa?categoryID=149

  • How to find the most recently read or access files or documents.

    In XP, there is a choice of the icon when you open start botton for the most recently viewed or read files.  Once again, I would like this feature.  How?

    Currently, I click on start, then the documents, and the only choice which is "recently changed". This choice is usually useless for me.  Thank you

    Windows, which fell in the start menu because now you can pin programs to the start menu and programs have separate to show their recent files in the same kind of drop-down menu, then it has become redundant.

    In the same start menu list watch the privacy section and check the two options and apply.

    Once these programs are on the list of the start menu, make a right click and select PIN to start menu, all recent item will be on this list and can be pinned to this list.

    You can also drag and pin programs to the taskbar as well.

    Also if you want an option to see recently changed items, open your library and on the top of the left column is changed recently listed, click with the right button on this list, select send to and click on create the shortcut on the desktop, once on your desktop you can drag to your taskbar or just leave it there change the display of this page and the dates of changes will be listed.

  • How can I merge files and preserve the most recent file?

    I keep my work files in a file on two separate computers (2 folders). As I work on every computer at different times, I have a mixture of old and new files.

    I want to merge these two files. Before doing so, I want to assure you that Windows 7 keeps the most recent document instead of just replace one file with another, regardless of the date since modified.

    Is this something that Windows 7 is done automatically? If not, is there a tool that will help in this process?

    When you copy files with the same name in a folder, Explorer will ask you if you want to replace the existing file, skip, or keep and rename the latest files, and it will show you the size and creation date.
     

    --
    Dave N.
    MS - MVP (Mail)
    Windows 7 Ultimate
    http://download.live.com/wlmail
     
     
    "SamedySam" wrote in message News: e7b7f37f-05ab-42b5-9b07-c93b46c8e08f...

    I keep my work files in a file on two separate computers (2 folders). As I work on every computer at different times, I have a mixture of old and new files.

    I want to merge these two files. Before doing so, I want to assure you that Windows 7 keeps the most recent document instead of just replace one file with another, regardless of the date since modified.

    Is this something that Windows 7 is done automatically? If not, is there a tool that will help in this process?

    32-bit Windows 7 beta

  • I'm trying to download the media feature pack for windows 7n and it tell me to validate using GenuineCheck, but when I do it says that I should download the most recent version uses 64-bit window 7n

    I'm trying to download the media feature pack for windows 7n and it tell me to validate using GenuineCheck, but when I do it says that I should download the most recent version uses 64-bit window 7n

    You must use internet explore 32 bit.

Maybe you are looking for

  • iPhone SE (and other iPhones) LTE bands for the United States and EU

    Issues related to the: 1 is the work of A1662 free default sim in the EU (Germany, France, Sweden, United Kingdom) Although it having not band 7? According to this article: http://www.theguardian.com/technology/blog/2012/Mar/28/4G-broadband-UK-how-fa

  • threshold range slide imaq vision

    Hello.. But... I want to know how can I put a slide to change the range of the threshold in this spare part? and how do I do it... automaticaly... When I change the value of the beach... the range automatically changes in the image. ? Thank you very

  • How can I get rid of IncrediMail, who took over a large part of my computer?

    I have innocentally and nieveally (spelling?), accepted this free offer to accept this IncrediMail which has action figures etc but it won't let me get rid of! There constantally figures popping out and all sorts of stuff interupts me! Actually it's

  • P6-2370ea: regarding the power supply

    So, I was reading on the replacement of your GPU (or in my place, just put a new in, my GPU is integrated) and apparently there was something too whatever to your diet might prevent from starting. I tried to use a calculator of the PSU, but I know no

  • I installed windows vista service pack 1 and now problems

    I installed windows vista service pack 1, and now it will not connect to the printer and I have no sound! I've updated the drivers of the two, and they work both according to their status of device but no sounds or printer connection. Help, please.