Automatically update creation/modification times.

HI,
I'd like to create a script that automatically sets the creation and/or modification time to 'now' whenever a folder/file is added to a directory. When I use Firefox and send my downloads to a specific folder, it resets those times. This allows me to sort by date and always see my newest files at the top. In Safari, it doesn't change these times, and I can't sort this way.
I also like that such a script would allow me take advantage of its functionality for any file I placed in a particular folder. Any ideas?
Thanks.

Hi, thank you for your response.
I spent a bunch of time working on this but I still can't make it work. To get it to compile, I added "to" at the end of the last line. Hopefully that's correct. As for the rest of it, nothing seems to happen.
I have another folder action that acts on every file as it's added to this folder and that one works, so I don't ''think'' I'm attaching it incorrectly. I removed this other action for the purpose of testing. The context menu for the folder in question shows an item "Remove a Folder Action" listing the new script.
As your script seems cleaner I would prefer to make it work. However, using the wording of yours I was able to search and piece together some other stuff that kinda sorta works. The first part is...
on adding folder items to this_folder after receiving these_items
repeat with file_ in these_items
tell application "Finder"
set file_ to POSIX path of file_
do shell script "touch -c " & quoted form of file_
end tell
end repeat
end adding folder items to
A problem with this script was that the Finder didn't always apply the sort even when the modification time was changed successfully. I had to manually sort on something else, and then go back to modification time sort. So I added this after the 'end repeat'...
tell application "Finder"
set theItems to name of every file of folder this_folder
sort theItems by modification date
end tell
The whole thing seems to work intermittently. Occasionally, it fails to perform one or the other of its tasks. I haven't figured out why it does this, but it will disable folder actions without warning. Once I re-enable them, it starts working again. I don't know if it's disabling first, or failing and then disabling.
Any help is always appreciated. Thank you.
PS. I don't know how to change the code snippets to grey monospace.
Message was edited by: Decidus

Similar Messages

  • Firefox does not start up after an automatic update. Every time i try to open it, it just prompts the Mozilla Crash Reporter.

    Firefox does not start up after an automatic update. Every time i try to open it, it just prompts the Mozilla Crash Reporter.
    ''Add-ons: {972ce4c6-7e08-4474-a285-3208198ce6fd}:3.6.10
    BuildID: 20100914125854
    CrashTime: 1290192405
    EMCheckCompatibility: true
    FramePoisonBase: 00000000f0de0000
    FramePoisonSize: 65536
    InstallTime: 1287124738
    ProductName: Firefox
    ReleaseChannel: release
    SecondsSinceLastCrash: 422
    StartupTime: 1290192405
    Theme: classic/1.0
    Throttleable: 1
    Vendor: Mozilla
    Version: 3.6.10
    This report also contains technical information about the state of the application when it crashed.''
    Same thing happens when i click restart.
    No difference when i run it in Safe mode. And it won't let me create a new profile either. Is there anyway else i can extract my bookmarks? This is driving me crazy!

    Did the crash reporter send any crash reports?<br />
    You can see the crash reports in this folder:
    "C:\Users\&lt;user&gt;\AppData\Roaming\Mozilla\Firefox\Crash Reports"
    See: http://kb.mozillazine.org/Breakpad
    See also [[Firefox crashes when you open it]]
    Create a new profile as a test to check if your current profile is causing the problems.<br /><br />
    See [[Basic Troubleshooting#Make_a_new_profile|Basic Troubleshooting&#58; Make a new profile]]<br /><br />
    There may be extensions and plugins installed by default in a new profile, so check that in "Tools > Add-ons > Extensions & Plugins"<br /><br />
    If that new profile works then you can transfer some files from the old profile to that new profile (be careful not to copy corrupted files)<br /><br />
    See http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox<br /><br />
    If that still causes the same problem then do a clean reinstall and remove the Firefox program folder.
    * Download a fresh Firefox copy from http://www.mozilla.com/firefox/all.html and save the file to the desktop.
    * Uninstall your current Firefox version and remove the Firefox program folder before installing that copy of the Firefox installer.
    * Don't remove personal data when uninstalling.
    * It is important to delete the Firefox program folder to remove all the files and make sure that there are no problems with files that were leftover after uninstalling.
    See:
    * http://kb.mozillazine.org/Standard_diagnostic_-_Firefox#Clean_reinstall

  • Why do have to disable Yahoo automatic updates all the time?

    I used to be able to open Firefox, and then open my Yahoo mail account without having to go through the additional step of disabling automatic updates. How can I permanently disable automatic updates, so I don't have to do it every time?

    If you are using home sharing then yes. Only photos used for the screensaver are temporarily cached, nothing else is stored. There is no need to restore the unit in order to view photos from your computer's library.

  • Automatic PO Creation at time of CO Shipment

    Hi,
    We are looking at a business model where at time of shipment of goods to the customer a corresponding PO (or PO line) is created and receipted to a vendor for the goods just shipped. Ideally we would like to see this process automated. We are fairly new to Oracle and are looking for ways to achieve this. Any ideas?
    Thanks,
    AK

    Hi,
    Pl Make sure you have done following settings for the Automatic Creation of PO during GR:
    1) In SPRO ---> Enterprise Structure ---> Assignment -
    > Material Management ---> Assign Std. Purchase Org. to your Plant...
    2) In Material Master -
    > Purchasing View -
    > Pl. Check. Automatic PO check Box and Maintain Purchasing Group....
    3)Create your Vendor for oyur Company Code and Std. Pur. Org. combination and in that Vendor Master -> Purchasing Data View--- > Pl. Check Auto. PO Check Box...
    4)For your Vendor -Material Master - Plant -Std. Pur. Org combination Maintain valid Info record...
    5)In OLMB ---> Goods Receipt -
    > Automatic Creation of PO ---> for the M.Type:101 pl. check Auto PO check Box
    6) In OLMB ---> Movement types ---> Copy,Delete, Check M.Types ---> Choose the M.Type:101 and go into Details -
    > Then goto allowed Fields for M.Types for M.Type:101 ---> there for the M.Type:101 make the field LIFNR as a Mandatoty field...
    If you have done the above settings properly...then in MIGO ---> Choose Transaction GR and referance as Others
    and do the GR....Make sure you are doing GR with M.Type:101....and you give the Vendor's name during GR....
    Now If you save the GR ...automatically PO will be created...
    this you can see it by displaying the MIGO Document..
    Regards

  • How to automatically update date and time on Numbers spreadsheet

    Would like to have printed version of Numbers spreadsheet reflect present date and time.  I know how to do this in Excel, but can't figure out how to get there in Numbers.

    Add the date and time to the Header or Footer in the Print Dialog via the Insert menu.
    It is only semi-automatic, in that to update the date and time, you must either delete and reinsert the date and time, or you must open the token and update by clicking the Set to Today button.
    Jerry

  • How can i set signature creation/modification time at signature creation?

    Hi,
    I have an acrobat plugin (PubSec), written using sdk 9 and running on acrobat x. i have noticed that after creating a new signature using my plugin the signing time i put in the signature appearance is different from the "M:" entry in signature dictionary. I tried the same process (i.e signature creation) using adobe's default plugin but this time there was no discrepency in datetime values.
    The time difference is variable, usually a couple of seconds. I have tried to set the "M:" entry in signature dictionary "V" via the following code in the
    SigGetProperties() callback:
    void DSEngine::sigGetSigProperties( PSSigSigPropParams params )
          std::string dateString = "20110518163011+04'00'";    // here i have used current time as well but doesnt work
          // used "D:
    20110518163011+04'00'
    " version as well but no use.
              ASText dateText = ASTextFromScriptText ((const char*)dateString.c_str(), kASRomanScript);
              ASCabPutText(params->outNewSigPropCab, PROP_SigProp_Date, dateText);
    Please help me remove this time difference.
    Who sets "M:" value and at which point during signature creation (i mean in which callback)?
    Is above code the right way to set "M:" entry (i.e. signing time) of signature dictionary "V"?
    Is the sigGetSigProperties() callback the right place to put this code?
    Thanks

    As far as I'm aware GarageBand for iPad only supports 4/4 time, at least in it's present form.
    tt2

  • Automatic update value after time period passes

    Hi,
    In my application on page 8 I have an item which value is to be changed from one value to another depending on a time period. At first the item has value 1. Then we set it on value 2 and we also set a time period, for example 5 days. So after that period the value should automatically change on the value 1.
    On page 1 there is a region with a list entries, subjects which have the value 2 set. I want this list to change according the change of value.
    Does anyone know how to do this? I am a bit clueless...
    Thanks
    Regards,
    Leila

    There appears to be logical issue here.
    a) The value will be incremented only when user visits the Page 8 . If user does not visit Page 8 then the change will not occur
    b) If the user visits Page 8 but does not save the change (commit) even then the change would not come into effect.
    Can this not be handled through a scheduled job that runs on the underlying tables at per-determined intervals/time? Say , once a day?
    If the above 2 points do not affect you then you can try the Process route.
    i) Write a OnLoad Before Header or After header process on Page 8
    ii) In this process find out whether the required/preset interval has elapsed on not
    iii) If the criteria is met then change the value of the Page 8 as well as Page 1 items using bind variable sysntax in the Process
    :P12_ITEM := '2' ; -- or whatever you want.
    :P1_ITEM := :P12_ITEM;How to figure out the interval? If it is date/time based then use SYSDATE. If it is something else , you need to figure out the interval calculation that works for you.
    Regards,

  • Semi - Smart Albums - all I want is to update iPhoto every time I add a new

    after reading the iPhoto Help files descriptions of Standard and Smart - Im after Semi - Smart.
    Standard: You can also create an album by dragging a folder of photos from the Finder into an empty part of iPhoto's Source list. iPhoto creates an album with the folder's name and imports all photos contained in the folder.
    - but what iPhoto 6 wont do is automatically update itself every time I add a new pic into the source folder.
    Smart Folder: "You can make a Smart Album that contains only certain types of photos, photos with high ratings, or photos that match other criteria, including EXIF information, such as a specific shutter speed or camera model....
    iPhoto automatically modifies a Smart Album when any photo that matches the album's settings is added to or removed from your library."
    but what iPhoto 6 wont do is to simply capture the folder name as Ive named it in my source folder structure.
    So Im after:
    a. drag a folder ( for example, cars, gemstones, Klimit art) into the iPhoto source pane, it becomes a semi-smart folder in that it watches every new change I make to the source files on my computer. I add a file, iPhoto 6 adds it. I delete one, it deletes it. I mod it - you get the game here.
    Do I need to upgrade iPhoto to handle this rudimentary task ? Seems like this action would be built in - am I missing something here ?
    TIA

    will try that out, thanks for the tip.
    Who would want to have to use Automator or Applescript to make such a rudimentary function enabled within iPhoto ? I would guess 95% of Mac users never use those things. The whole point of Mac is to keep your life from having to descend into mundane technical details, thus freeing one for more time with life's higher level tasks. This should be basic from-day-one type behavior in any photo app.
    Will chime back in on how difficult it get iPhoto to auto-update itself with every new pic I add/subtract to these watched folders.

  • Lumia 925 is missing "automatically update date an...

    My Lumia 925 is missing "automatically update date and time" setting. I have the latest firmware 3049.0000.1330.0009. The phone is not locked to any carrier.
    Any ideas?
    Solved!
    Go to Solution.

    Check you have all the latest system app updates. To do so, download and install an app called Lumia System Updater and use it to check and update the system apps as necessary. 

  • Automatic update purge?

    I have been refusing to allow some updates in automatic update for some time... every time it try's to update iphoto and iweb via the following
    "This update to iPhoto contains new calendar, greeting card, and postcard themes for use with Apple print services, including a variety of holiday card designs. It also addresses compatibility for accessing Aperture 1.5 content in iPhoto."
    I do not use aperture and ive been trying to avoid adding this 100mb's to my computer every time automatic updates loads.. is there anyway to permanantly refuse these updates, or is there a way i can downloaded them, then delete them, and all previous unneeded updates
    its becoming to me as annoying as desktop cleanup wizard, accept i have to open this, tell it no, and close it every time
    ~David

    Machado wrote:
    thank you so much. is there a place where i can locate old updates that are taking up space to remove them manually?
    Old automatic software updates are not stored on the HD anymore. All there is a Receipt which is necessary in order to inform the systems that the update has been installed.
    Only manually downloaded updates are saved, for obvious reasons. They are usually in the download directory.
    I don't know what goes on with automatic downloads when the box "Download automatic updates automatically" is checked. I presume that after they are installed, the downloaded file is automatically trashed.

  • Automate partition creation

    Hi,
    Is there any example out there on how to automate the creation of time based partitions?
    As an example, I would like to create 1 partition for each quarter and when a new quarter start have a new partition automatically added with the same attributes than the previous one.
    I would also have the oldest 4 partitions automatically deleted as soon as the total number of partitions reaches 13.
    Any thoughts or links?
    Thanks,
    Philippe

    Hi Philippe,
    The Project REAL Analysis Services Technical Drilldown discusses one implementation of such automation:
    http://www.microsoft.com/technet/prodtechnol/sql/2005/realastd.mspx
    >>
    Project REAL: Analysis Services Technical Drilldown
    By Dave Wickert, Microsoft Corporation
    SQL Server Technical Article
    Published: September 2005
    Appendix A: Automating Partition Creation
    The Project REAL design uses partitioning quite heavily. The production system has more than 220 extremely large partitions. The sample data uses over 125 partitions that are only tens of thousands of records per partition. The full production system has 180 to 200 million records per partition. With so many partitions, extensive typing was required to create each partition every time we generated a new schema.
    So, as the saying goes, “When the going gets rough, a programmer writes a program.”
    This appendix documents the BuildASPartition SQL Server 2005 Integration Services package that we created to automate the building of Analysis Services measure group partitions in SQL Server 2005 Analysis Services databases. This package synchronizes the relational partition scheme with the Analysis Services partition scheme. It loops through the relational database looking for a weekly fact table partition (by using a table naming convention). If a relational table is found, it looks to see if an Analysis Services measure group partition already exists (using the same naming convention). If not, it constructs and executes a XMLA script that creates it.
    >>

  • Can you set up an automatic page update based on time?

    I was curious if, in dreamweaver, you can set up a page to
    automatically update at a certain time. For instance, I want the
    home page to replace 2 buttons at 12:30pm on November 3. Is this
    possible? Or do I have to upload a page manually at that time?
    Thanks!

    DW doesn't do that.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "nocontende" <[email protected]> wrote in
    message
    news:ei5rb6$57v$[email protected]..
    >I was curious if, in dreamweaver, you can set up a page
    to automatically
    >update
    > at a certain time. For instance, I want the home page to
    replace 2
    > buttons at
    > 12:30pm on November 3. Is this possible? Or do I have to
    upload a page
    > manually at that time? Thanks!
    >

  • Automatic Batch Creation at  the time of GR for Customer Returns

    Hi All,
    We are using batch management with functionality of automatic batch creation for variuos movement type 101/103/105/561 etc. with updation of classification in foreground. 
    We are even using automatic batch creation for Inbound delivery. By configuring IMG object "Batch creation Control for Inbound"
    Now we have a new requirement of automatic Batch creation for GR of Customer Return against Customer Return SO (Movement type 651). And updation of classification in foreground.
    I have tried a lot but couldn't find how to configure the same.
    Can I create GR custmor returns 651 thru transaction MIGO?
    Any suggestion how to achieve this.
    Thanks
    Sanjay

    Hi,
    What Sairam said is correct, the idea of automatic batch creation is so that when you manaufacture or create an item you can allocate the characteristics to that batch and give it a number.
    You then sell that batch to a customer.
    When the customer returns the item the system should NOT automatically allocate a new batch number to it because this is breaking a VERY important audit trail.
    In batch management (in some inductries more than  others) it is VITAL to have a full audit trail of a bathc so that any problems concerning that batch can be traced back to their origin. What you are trying to do is to break that audit trail (although I can fully understand what you are trying to do).
    I would leave the batch allocation for returns as manual and then when you transafer the item from returns to unrestricted (or quality etc.) tyou can then input the new characteristics.
    Steve B

  • How do I make an inserted date and/or time automatically update in Pages 5.1?

    In the previous version, there was an option to automatically update date / time when you clicked on the inserted text. This option is no longer there for me, only the ability to change to format of the insertion or to change the date manually. Is there no longer a way to do this?

    Apple has removed over 90+ features in Pages 5
    Pages '09 should still be in your Applications/iWork folder.
    Trash/archive Pages 5 after Exporting your files to Pages '09 format.
    Then rate/review Pages 5 in the App Store and wait for Apple to get it out of beta.
    Peter

  • In Pages how do you automatically update a date in a document each time you open the document?

    That's all I need to know, and also if it isn't possible, I'd like to know that.
    Thanks,

    After one enters the Date/Time in Pages '09, the Edit Date & Time item on the contextual menu provides a checkable Automatically update on open. Every version of Pages v5 lacks this capability, and the auto-update setting will be ignored in a Pages '09 document opened in Pages v5.

Maybe you are looking for

  • SAAJ  (size of Attachment)

    Hi, I have a problem when I use SAAJ with attachment. I using jboss + axis. This is my error: "- java.io.IOException: java.net.SocketException: Connection reset by peer: socket write error" In my example, client creates an attachment's list and serve

  • SocketException reading request, ignored in Tomcat !

    In my application I get sometimes the following Exception : ContextManager: SocketException reading request, ignored - java.net.SocketException: Connection reset by peer: JVM_recv in socket input stream read      at java.net.SocketInputStream.socketR

  • Read only fields in selection screen

    Hi, I have a parameter in a selection screen and wanted it be read only, mean only values could be displayed but it should not allow the user to either enter or modify existing values. Can any one please suggest how to do this ? Thanks and best regar

  • Black and white printing problem on Epson Artisan 50

    When I print a black and white photo on glossy paper, I don't get black and white. I get a kind of purple hued black and white. Black text below, however, is perfectly black. So it seems it's not some kind of fault with the ink. I am choosing "black/

  • Calls from the UK to Brazil

    Please someone help me..I've been experiencing extremely poor quality when calling my parents landline in Brazil since I started paying a subscription. They cannot hear me or we get diconnected. It happens so often that it puts me off from calling th