# Set File date/Time?

**URL:** https://www.finalbuilder.com/forums/t/set-file-date-time/289
**Category:** Discussion
**Created:** [December 23, 2006, 3:19am UTC](https://www.finalbuilder.com/forums/t/set-file-date-time/289 "2006-12-23T03:19:31Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![wasowerby](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/w/b77776/32.png) [@wasowerby](https://www.finalbuilder.com/forums/u/wasowerby)
#### Post date: [December 23, 2006, 3:19am UTC](https://www.finalbuilder.com/forums/t/set-file-date-time/289/1 "2006-12-23T03:19:31Z")

</div>

Am evaluating FB as a replacement for QSC TC Builder. However, I seem unable to do something as simple as setting a file’s Date/Time from a project variable. Looking at the File & Directories action list, I don’t see a SetFile/Folder date/time action. Am I missing something obvious?Andrew

---

<div class="post-metadata">

### Author: ![wasowerby](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/w/b77776/32.png) [@wasowerby](https://www.finalbuilder.com/forums/u/wasowerby)
#### Post date: [December 23, 2006, 12:18pm UTC](https://www.finalbuilder.com/forums/t/set-file-date-time/289/2 "2006-12-23T12:18:55Z")

</div>

ok, using:  
  
Action.DateTime = Cdate(variable)  
  
in the TouchFile BeforeAction EH does the trick. Very strange that this isn’t a standard action though!

---

<div class="post-metadata">

### Author: ![wasowerby](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/w/b77776/32.png) [@wasowerby](https://www.finalbuilder.com/forums/u/wasowerby)
#### Post date: [December 24, 2006, 7:46am UTC](https://www.finalbuilder.com/forums/t/set-file-date-time/289/3 "2006-12-24T07:46:30Z")

</div>

Ah, but it only works for one file (or a wildcard set). Anyone know how to make it work for a number of non-wildcard files?Thanks

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [December 27, 2006, 7:23am UTC](https://www.finalbuilder.com/forums/t/set-file-date-time/289/4 "2006-12-27T07:23:58Z")

</div>

Hi Andrew  
  
You can use the Touch action to set the file date and/or time.

---

<div class="post-metadata">

### Author: ![wasowerby](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/w/b77776/32.png) [@wasowerby](https://www.finalbuilder.com/forums/u/wasowerby)
#### Post date: [December 27, 2006, 8:27am UTC](https://www.finalbuilder.com/forums/t/set-file-date-time/289/5 "2006-12-27T08:27:17Z")

</div>

Hi Vincent,Yes, I found the Touch action thanks. Is there a way of setting the date/time for a number of files with different names and extensions using one Touch action - rather than having to use one action per file?

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [December 27, 2006, 10:36am UTC](https://www.finalbuilder.com/forums/t/set-file-date-time/289/6 "2006-12-27T10:36:58Z")

</div>

Define a fileset and then use a File Iterator to iterate through the fileset and add a Touch action as a child of the Iterator. The Iterator allows you to specify a variable to hold the current filename which can then be used with the Touch Action. We will lok into adding FileSet support directly to the Touch action in the future (will improve performance).

---

<div class="post-metadata">

### Author: ![wasowerby](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/w/b77776/32.png) [@wasowerby](https://www.finalbuilder.com/forums/u/wasowerby)
#### Post date: [December 28, 2006, 3:02am UTC](https://www.finalbuilder.com/forums/t/set-file-date-time/289/7 "2006-12-28T03:02:50Z")

</div>

Thanks Vincent. Will try that out. An enhanced Touch action to do this would be great.Regards…Andrew
