How does one script date math?
For example I want to move files from last week into a folder. Selecting by modified date and moving is easy. I would like the folder name to be a specific date, something like today's date <date yyyy-mm-dd> minus 7 days. Then I could put that value into the folder name, something like "Files from the week of yyyy-mm-dd".
I have found things to modify a files time, e.g. <datem -7d yyyy-mm-dd>. But I want to base mine on today's date not on some files time.
Sorry if this is so obvious that I somehow missed it.
Thanks in advance, Shawn
Date Math
-
admin
- Site Admin
- Posts: 66324
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Date Math
Interesting, I wanted to reply:
but it does not work! I implemented the shifts only for the file dates. Next beta...
Code: Select all
echo "<date -7d yyyy-mm-dd>";FAQ | XY News RSS | XY X
-
murdock01
- Posts: 55
- Joined: 08 Nov 2010 19:35
Re: Date Math
Just downloaded the latest beta.
Just wanted to say thanks for the update. As always, the best support from any product I use or have experience with.
Just wanted to say thanks for the update. As always, the best support from any product I use or have experience with.
XYplorer Beta Club