Query a directory and delete all files older than 1 hours

How do I query a directory and delete all files in this directory that are older than 1 hour?

I used CFDIRECTORY before displaying the pages in the directory and the directory information, but I can't understand how to query a directory and delete all files older than 1 hour of this directory.

1 hour of old means that time is NOW over an hour of the date and time of the file on the server.

You need to the user a combonation of the tag to read files and the to delete the files in conjunction of a tag to decide when and when not to do the removal.  The dateDiff function would be useful in this decision.

In the pseduo code:




   
     
  

NOTE: Look closely at the way the dateDiff works with fractional amounts.  That is, 59 minutes and 59 seconds is 0 hours while 1 hour and 1 second is 1 hour with the value of 'h' percision.

Also note that I didn't look at the syntax for one of these tags, and I probably poorly named and. or misorderd settings.

Tags: ColdFusion

Similar Questions

  • How can I search for and delete all files transferred to double

    I have double the files transferred from another computer, as well as data in my phone WM6.5 double and photos from my camera in double.

    I am on Windows 7 and looking for a way to compile, sort out the duplicate a lot of files, I created over time, by many safeguards.

    I have several Vista computer files, multiple files of phone WM6.5 and several photos of the camera.

    64 - bit Operating System

    P350 Duo CPU @ 2 GHz

    Toshiba

    4.00 GB RAM

    Hello

    Here are several free utilities and they have all their benefits and their methods.

    Auslogics Duplicate File Finder is the MD5 search engine that allows you to find duplicate
    files content, without worrying other matching criteria. It would be useful, for example, when two
    identical mp3 tracks or video files have different names
    http://www.Auslogics.com/en/software/duplicate-file-Finder

    find and delete the duplicate - free
    http://www.easyduplicatefinder.com/
    Versions Installer and Portable

    Search files in doubles or similar - even binary - free
    http://www.Joerg-Rosenthal.com/en/antitwin/

    quickly find all the files in a folder and its subfolders - free duplicate
    http://www.Mindgems.com/products/fast-duplicate-file-Finder/fast-duplicate-file-Finder-about.htm

    Duplicate File Finder - Smart Port Forwarding - TCP Port Scanner - TCP Port Tunnel - multi-minuterie-free
    http://www.brooksyounce.com/

    Duplicate File Finder software (pictures, mp3, iTunes)
    http://www.Moleskinsoft.com/

    Hope these helps.

    Rob - bicycle - Mark Twain said it is good.

  • ASMCMD delete files older than N days

    Hello

    in ASM diskgroup.

    (under the same directory)

    ASMCMD > ls - Lt.

    ... (thoudsands of log files looks at, for example, log_19.26718.790635667).

    How can I delete these files older than 10 days on a single command line?


    Thank you

    Edited by: 951932 24 October 2012 09:53

    Change the query that is used in wire,

    declare cur CURSOR,
    Select fname, numero_fichier, gnum gname from
    (SELECT numero_fichier gname, gnum, filnum, concat ('+' | gname, sys_connect_by_path (aname, ' /')) fname)
    FROM (SELECT file_number, g.name gname, out a.parent_index, b.SID Anom,
    a.reference_index rindex, a.group_number gnum, filnum a.file_number
    Of
    v$ asm_alias, v$ asm_diskgroup g
    WHERE a.group_number = g.group_number
    )
    START WITH (mod (out, power (2: 24))) = 0
    CONNECT BY PRIOR Rindex = out) output
    where gname = 'TEST'---> DG name
    and
    There are
    (select 'X' from v$ asm_file b)
    where b.file_number = output.file_number
    and b.group_number = output.gnum
    and b.type = 'FLASHBACK'
    and b.MODIFICATION_DATE<>
    );
    sqlstr VARCHAR2 (250);
    BEGIN
    FOR my heart IN cur_rec
    LOOP
    sqlstr: = 'alter diskgroup' | cur_rec.gname | "fall of file"' | cur_rec.fname | " « ; » ;
    DBMS_OUTPUT. Put_line (sqlstr);
    END LOOP;
    END;

    Published by: renee_mathieu on October 24, 2012 13:04

  • Creative cloud says I am out of space, even after deleting all files from archive

    So earlier today, I ran out of space in the creative clouds. I went to archive and deleted all files (archives are now totally empty).

    I have some files left in the Cloud, but they occupy only 3.18 GB. In any case, the cloud always said I used 100% of my storage space of 20 GB and I get the "out of storage" error message when you try to synchronize new files!

    Hey,.

    So I was legitimately deal with this, but I thought about it.

    Apparently, anything you download is checked and it does not show in your desktop folder.

    If you connect to your cloud to Adobe online, you can go to 'Archived' under 'Files' and delete everything again.

    I don't know if you can disable archiving, but it does not work. I was able to download a * after hours of not being able to file.

    I hope this helps!

  • All IT gurus out there who know Firefox... have lost the passwords saved when FF created a new profile and delete old files key3.dbf and logins.json profile.

    All IT gurus out there who know Firefox... have lost the passwords saved when FF created a new profile and delete old files key3.dbf and logins.json profile. Any ideas, anyone?

    So it's not a logins.json file?

    I see a signons3.txt file and a file signons.sqlite older, if you can try to see if you can import passwords stored in this file.

    You can force Firefox to re-import the passwords in the file signons.sqlite and regenerate the file logins.json with the following steps:

    • reset the signon.importedFromSqlite pref on the topic: config page by default via the context menu
    • Delete the logins.json file in the closed Firefox with Firefox profile folder

    When you restart Firefox, then you should have the pref signon.importedFromSqlite with the value set to true.
    You have passwords that are imported in the password manager, unless there were errors or signons.sqlite signons3.txt.

    You can open the topic: config page via the address bar.
    You can accept the warning and click on "I'll be careful" to continue.

    You can use this button to go to the current Firefox profile folder:

  • Find file more recent directory and delete after 10 files

    Hello

    I want to create a vi that can do two things

    1 entry: 1. 2 directory. Number

    2. output: new file in the directory specified

    3. delete all the old files if the number is two, so if the number = 2 then only keep two new files in the directory and delete the rest

    How can I do this? I can't find andy function to get the date of a file?

    Thanks for your help

    Hello

    LabVIEW has a function called 'file Info', this will give you the date of last modification. This may be not the same as the creation date. This function is used in a cool example called '\Listbox to the file Explorer Demo.vi' find it with the finder of the example. But as I said the date of data and creation of change cannot be the same. So I made something using the dir command system and exe function. I think that much better. The dir command is documented here http://www.computerhope.com/dirhlp.htm. The result is the attached VI. You may need to change to adapt to you need

  • I completely deleted Firefox and deleted all the files. After installing fresh Firefox, Firefox sees that it has been installed previously?

    I completely deleted Firefox and deleted all the files. After installing fresh Firefox, Firefox sees that it has been installed previously? "Looks like you have reinstalled Firefox. Want us to clean for a fresh experience and as new? »

    I uninstalled Firefox (so-called) "completely" using the guide here: https://support.mozilla.org/en-US/kb/uninstall-firefox-from-your-computer

    Why the new installation of Firefox recognizes that it has already been installed? Uninstall tool to uninstall Firefox COMPLETELY. As it is, can someone tell me what is the appropriate procedure for removal COMPLETE?

    All right, thank you in any case obtained.

    I removed all of these places:

    -

    -

    C:\Program Files (x 86) \Mozilla Firefox

    C:\Users\Chris\AppData\Roaming\Mozilla\Firefox

    C:\Users\Chris\AppData\Local\Mozilla\Firefox

    -

    C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Mozilla Firefox.lnk

    -

    HKEY_LOCAL_MACHINE\Software\Wow6432Node\Mozilla\Firefox

    HKEY_CURRENT_USER\Software\Wow6432Node\Mozilla\Firefox

    50.0 Firefox HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Mozilla (x 86 en - us)

    -

    ApplicationIcon

    HideIconsCommand

    ShowIconsCommand

    ReinstallCommand

    Installation directory

    PathToExe

    PathToExe

    Components

    Plugins

    ApplicationIcon

    HideIconsCommand

    ShowIconsCommand

    ReinstallCommand

    Mozilla, please take note and to integrate them in your current "uninstaller" tool. Thank you.

  • Cannot open Firefox even after deleting all files and profiles of school boards.

    My computer auto-installé the new Firefox version 40.0.2 (and later 40.0.3) and the browser does not open. It worked and I have not received any error message. I tried every fix I can find here, and even manually, I deleted all of my profiles, folders, program files, uninstalled, reinstalled, restarted my computer, and it still not open. I click on the Firefox button in my bar tasks, the charging symbol goes for a few seconds, then more nothing. Firefox opens and runs without any problems on other computer on computer accounts. I even copied the files of Firefox to the another computer account on which it runs and replaced all files on the computer account that Firefox does not on, rebooted and still nothing. I've been dealing with this issue for over 2 weeks now and am very frustrated because I spent hours trying everything I can find.

    This fix does not work either... tried previously and tried again. However I FINALLY got my Firefox to work on mine. I ended up finding a virus free online (ESET online scanner) scanner and do a full scan on my computer in order to remove anything that could cause a problem. I also went through all my computer programs and documents and cookies and temporary internet files and deleted everything which is not necessary or if it is no longer used. I thought it must be something else because Firefox has no problems with other users of the computer, and my original profile worked very well under other computer users when transferred manually. I think something was interfering with Firefox, which is why none of the fixes here worked because they targeted Firefox itself when it seems that it wasn't the problem.

    Thank you all for your comments!

  • my computer updated and delete all my files, how to bring them back?

    original title: help! my computer updated and delete all my files, how to bring them back?

    Help!  My computer did an automatic update and deleted all my files and I can't find one of my old files, how to bring them back?

    You get an error message on a Temp profile?

    Try this:

    Restore point:

    http://www.howtogeek.com/HOWTO/Windows-Vista/using-Windows-Vista-system-restore/

    Do Safe Mode system restore, if it is impossible to do in Normal Mode.

    Try typing F8 at startup and in the list of Boot selections, select Mode safe using ARROW top to go there > and then press ENTER.

    Try a restore of the system once, to choose a Restore Point prior to your problem...

    Click Start > programs > Accessories > system tools > system restore > choose another time > next > etc.

    http://www.windowsvistauserguide.com/system_restore.htm

    Read the above for a very good graph shows how backward more than 5 days in the System Restore Points by checking the correct box.

    See you soon.

    Mick Murphy - Microsoft partner

  • Is it safe to delete all files from "C:\Users\username\AppData\Local\Temp' __evry time I do and then try to use MS Office it asks me the install files. I'm reinstalling MS Office 2007 in its original DVD.

    I deleted all files in the TEMP folder. So when I try to open any MS Office 2007 program, it has me reinstall the suite complete from the original DVD, because the msi file is not the correct version. Is this normal?

    No problem as an administrator. Seems that the problem has nothing to do with the TEMP folder.

  • Satellite C50D-B-120: refresh your pc - it will delete all files

    Hello

    I'm looking at a friends by Satellite C50D-B-120. It does not start. There OpenOffice files on it, but I don't know exactly where. If I try the "Refresh your PC" option troubleshooting it will delete all files?

    Thank you

    Matt

    Hi Matt

    I found very interesting Toshiba technical support document in the Knowledge Base, and I think it might be useful to you.

    Windows Recovery 8 & repair
    APS2. Toshiba-tro.de/KB0/TSB2A03ES0000R01.htm

    The 'Refresh' option is primarily a repair technique. It is a good method to return your PC to a known good state while preserving your files and a large part of your configuration. With the option "Refresh your PC", accounts of users, data files and some settings are retained on your PC without the need to create a backup or make choices about what to keep or delete.

    This means that the data should not be affected by using the update your PC option.

  • Add, change and delete the file "iTunes" on a NAS

    I have just said "Apple Support Community" by Apple Support.

    The title probably sums up what I'm trying to do. I'm looking for a way to add, change, and delete files on a NAS.

    Hardware: MacBook Pro 15, 1 TB of storage, 16 GB memory, OSX El Capitan.

    NAS: Qnap TS - 453 has: storage nominally 16 TB, up to about 5 TB.  4 WD 4TB disks in a RAID 5 configuration.

    a Vaio WIN10 as well as a smaller MacBook (my wife)

    The purpose of the NAS is to provide a backup system for computers and act a server "iTunes."

    I acquired the NAS after the death of my WD MyBook live in December 2015 after five years of reading backup and "iTunes" to my computer and the Sonos system.

    After two months of 'getting to know you' with the NAS, I finally managed to configure the server "iTunes" and Mirabile Indo-European it works!  I'm just doing the SIN to a back-up for computers.

    Now for the question: I am looking for an app (for lack of a better term) that will allow me to add and remove files to and from the NAS "iTunes" folder

    My search for a solution so far has indicated that:

    (1) NAS' iTunes folder is not really true Apple iTunes and

    (2) I need something that is DAAP (Digital Audio Access Protocol) friendly, that would allow me to add, change and delete the files.that would allow me to add, edit and delete files.

    I'm not looking for something that would synchronize the files iTunes NAS to one of my computers, I am all prepared to do myself if necessary.

    If I can't find an application so I use the app 'Brute Force' change my Mac iTunes required records and download again to my NAS.

    Why do you need an app to put the files in a folder on the NAS Server?  Make them just above in the Finder.  Maybe I'm missing just your problematic here.  Do you mean add your PEMA files to iTunes? I've never used this file format, but kind of, I would be very surprised if iTunes supported it.

    the NAS iTunes folder is not really true Apple iTunes

    I don't understand what you're trying to say here.  "Apple iTunes" is an application. Yes, a folder is not an application.

    Be warned, we see not few messages from people that use iTunes with a NAS. Often the problems cannot be explained. sometimes just iTunes and NAS disagree togther.

  • How to recover photos from an iPhoto rebuild that occurred and delete all my photos?

    I have a Macbook Air running OS X Yosemite 10.10.1 and has been using iPhoto, when he told me to make a reconstruction of my iPhoto application to continue to use it.  My only option was to move forward, but when I did, the app rebooted and deleted all my photos and other video content recorded on the app. He has been on my iCloud and disappeared, since the restart of the application.  How can I get it back?

    Your backup is the obvious answer. If this is not possible:

    Download I rPhoto library to manageand use its function of reconstruction. (In early versions of the Library Manager, this is the file-> command Rebuild.) In versions later it is under the menu library.)

    This will create a completely new library. It will then copy (or try) your photos and all associated metadata and versions to this library and as close as possible to what you had in the damaged library fix it. It does this based on the information it finds in the iPhoto sharing mechanism - but it means that things not shared won't be there, so no slide shows, books or calendars, for example - but it should recover all your events, albums and keywords, faces and places.

    Because this process creates a completely new library and does not change your old, it is non-destructive, and if you are not satisfied with the result, you can simply go back to your old.

  • How can I set up a folder to automatically delete all files after that it was stored there for 30 days

    I want to create a folder so that after thirty days of files placed in there she is deleted and remain only the files that are less than 30 days?

    Thanks to advanced - Vondy

    Create a batchfile with the command shown here modified to suit to the--> http://stackoverflow.com/questions/51054/batch-file-to-delete-files-older-than-n-days

    Place the command batch file in your startup folder. It will run when you start Windows and delete the specified files.

  • Delete all files on the computer

    Hi guys!

    I have a question, it is perhaps obvious but as administrator of Mirage, an employee was stripped of his laptop computer (Mirage client has been installed on this laptop).

    Can I delete all files of this laptop, or totally remove the HDD with the Mirage Console?

    Thank you for all

    Thomas

    Hello

    in general it is not possible immediately as the laptop would not be connect to the mirage server.

    Therefore, you are not able to send a commissioning base layer that would give you the opportunity to bring the back of the laptop and vanilla State.

    Hope that helps.

Maybe you are looking for

  • Cannot download. No window click 'don't RUN', 'click here' doesnot work. IE10 Win7 64-bit

    After you click the Green download button I don't get the popup click the "Run". I get a gold at the bottom of my screen: "do you want to open or save Firefox Setup Stub (276ko) 28_0_exe of download - install .mozilla .net .cdn? . Open, save, cancel"

  • "Most visited" or "Recent visited" lists never change

    I tried the solutions described in previous discussions with similar titles: create a new 'smart' bookmark with a bit of code and setting a value of: config from scratch. Or help - list of the "most visited" & "recently visited" are always the same a

  • I can only erase an email both in El Capitan?

    El Capitan only allows you to delete an e-mail at a time or what I am doing wrong? Someone please help. Thank you.

  • No sound after reinstalling windows xp

    I formatted my hard drive and reinstalled Windows XP Professional.  I installed the SP3 also.  Except that now it does not even record that I have a sound card.  Reinstall, I used with sound edge and it worked perfectly, but now in Device manager the

  • Check the disk with Vista Home Premium

    I'm doing a disk check on my C drive with windows Vista, Home Premium, ed. I get to the point where it asks if I want to plan the audit to the next time I start the machine. But when I check that, close and restart, nothing seems to happen that my no