How to "touch" a file

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
agilefalcon
Posts: 3
Joined: 02 Feb 2018 05:05

How to "touch" a file

Post by agilefalcon »

I need to update one or many files with current date/time for creation date.
I've searched and can't seem to find this capability. CRTL + Right clicking a date just shows the date of the file in a variety of formats - with no way of changing it.

I'd like to be able to do this for one file or for many. The option to touch a file for creation or modification date would be useful.

Anyone know how to do this?

Chris

jupe
Posts: 3296
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: How to "touch" a file

Post by jupe »

agilefalcon wrote:CRTL + Right clicking a date just shows the date of the file in a variety of formats - with no way of changing it.
The second last item in that list you are talking about is touch.
touch.png
touch.png (17.02 KiB) Viewed 1169 times
So to answer your question, select the files you want, CTRL+RClick (or toggle click) the Created Date column and select the Touch item, and repeat in the Modified Date column if you desire, or you can write a script to do both simultaneously.

The very simplest form of a script is selecting all files you want the date changing for, and then type

Code: Select all

timestamp;
in the address bar, which would change all 3 dates of the selected files to now, or attach it to a button, for more ways to customize this script you can paste the following in the XY address bar if you are interested:

Code: Select all

help "idh_scripting_comref.htm#idh_sc_timestamp";
Also you can set the Modified date via the main menu at:

File | File Special | Set Modified Date to Current

You can also do it via the info panel, first make sure it is visible with F12, then switch to the properties tab, select the files you want to change then click on the date you want to change and clear the edit box then press the green tick button, if you are selecting the files properly it will say "[Applies to all # selected items]"

Image

RalphM
Posts: 2047
Joined: 27 Jan 2005 23:38
Location: Cairns, Australia

Re: How to "touch" a file

Post by RalphM »

Welcome to the forum.

Another way to do this is showing the info panel and click on any of the dates shown to change them.
Ralph :)
(OS: W11 24H2 Home x64 - XY: Current x32 beta - Office 2024 32-bit - Display: 1920x1080 @ 125%)

agilefalcon
Posts: 3
Joined: 02 Feb 2018 05:05

Re: How to "touch" a file

Post by agilefalcon »

Thank you, that was very useful.
Now if I can keep this application from going into "Not Responding" I'll be on a roll!

Thanks again.

Chris.

RalphM
Posts: 2047
Joined: 27 Jan 2005 23:38
Location: Cairns, Australia

Re: How to "touch" a file

Post by RalphM »

agilefalcon wrote:...Now if I can keep this application from going into "Not Responding"...
You'll find quite a few threads in this forum about cases like this with various reasons and solutions. I'd suggest you check these out first and if your situation that leads to it hasn't been covered yet, add to an existing or start a new thread for your case providing a lot more info on your setup, when/how it happens & such.
Ralph :)
(OS: W11 24H2 Home x64 - XY: Current x32 beta - Office 2024 32-bit - Display: 1920x1080 @ 125%)

Post Reply