Date Math
Posted: 03 Dec 2014 20:26
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
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