# Get File / Folder date : Created date & Compare date

**URL:** https://www.finalbuilder.com/forums/t/get-file-folder-date-created-date-compare-date/4103
**Category:** Feature Requests
**Created:** [July 8, 2010, 7:49am UTC](https://www.finalbuilder.com/forums/t/get-file-folder-date-created-date-compare-date/4103 "2010-07-08T07:49:20Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [July 8, 2010, 7:49am UTC](https://www.finalbuilder.com/forums/t/get-file-folder-date-created-date-compare-date/4103/1 "2010-07-08T07:49:20Z")

</div>

Hi everyone.  
  
In the action "Get File&nbsp;/&nbsp;Folder date", would it be possible to add the option to choose the wanted date?  
In example :&nbsp;Created&nbsp;Date, Modified Date, Last&nbsp;Access Date.  
  
Also, can we get a "Compare date" action. Basically it would enables us to compare if X date is equal, higher or lower than Y date.&nbsp;X&nbsp;date would be wither plugged or a variable. Y date would be plugged date, variable or a "forged date" like "3 months earlier".&nbsp;The action would need to fail if the date doesn't match the comparison. For functionnality, also add the option to&nbsp;not fail and save result in variable.  
  
Why ?  
  
I made an&nbsp;"Archiver" that will automatically archive 3 months old custom archives and logs we generate over other FB&nbsp;projects.&nbsp;I also made a weird but funtionnal step that auto-archive it's own archives and logs.&nbsp;It also archives FBServer's logs that are older than 3 months. (I&nbsp;had to create a delayed Scheduled Task since we have to restart FB's services).  
  
My problems?  
  
1) For now, it only verify the "modified date". So any frequently used projects will never get archived.  
2) I had to compare the date in javascript for FBServer's log and in&nbsp;TSQL&nbsp;for the custom logs we've made.&nbsp;JS code bellow. Feel free to steal . "OlderThanMonths" is an integer variable and reprensents the "3" months.&nbsp;This is done in the "BeforeAction".  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var fileDate = new Date(CurrentFBServerLogFileDate);  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var oldestFileAllowedDate = new Date();  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;oldestFileAllowedDate = new Date(oldestFileAllowedDate.setMonth(oldestFileAllowedDate.getMonth() -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OlderThanMonths));  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Do not archive if file is younger than the past X months. X = OlderThanMonths.  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (fileDate \> oldestFileAllowedDate)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SkipAction = "True";  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }  
  
Thank you.

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [December 13, 2010, 3:26am UTC](https://www.finalbuilder.com/forums/t/get-file-folder-date-created-date-compare-date/4103/2 "2010-12-13T03:26:31Z")

</div>

Hi everyone.  
  
I&nbsp;just want a quick update on this, would it be feasible?  
  
Thank you&nbsp;!
