How do you get file created time and add the time to filenname?

 

I have a file called MyDocument1.doc, I intend to add the file’s created or modified time at the end of the name, such as

MyDocment1 2015_02_27_11_02_AM.doc

 

Is there a way I can do this?

 

Thanks.

Hi Valve,

Yes and it should be fairly easy. Use a Get File/Folder Date action to extract the modified date from MyDocument1.doc. Then use a Rename File or Directory action to rename MyDocument1.doc using its original name with the formatted date appended to it.

The date will be formatted based on the format string specified in the variable in which its held. Therefore you can use the format string YYYY_MM_DD_HH_NN_SS_ampm with in the date variable to get the formatting you require. Then its a simple matter of concatenating the original file name with the new date variable value.