Skip to main content

Hi team, 

 

I am new to A360 and is trying to play around with it.

 

I am implementing a triggering email based on the local file date modified (last modified date). An email should be triggered to a person when Today() is 5 months after the last modified date.

But I am struggling on how to get the file’s last modified date. 

Once I could get the last modified date, I could do the calculation to subtract Today with Last modified date and store it inside a variable to be used at the condition, to trigger the email. 

 

However, I am stuck here.

 

Appreciate if anyone could help me figure out how and how can I move forward.

 

Thank you and have a great day ahead.

The File Utils package on the Bot Store can help you with the last modified date. Python script can, too, and I have an example that I posted on this board a while ago.

https://botstore.automationanywhere.com/bot/file-io-utilities-package

 


@Aaron.Gleason 

Hi Aaron, thank you for responding!

 

I was wondering if it is possible to use File attributes instead? Because I am implementing this bot using my company’s A360 account, not sure if I could easily install the bot store.


Hi ​@Aaron.Gleason ,

 

Thank you for responding. 

 

Fyi, I am using my company’s account to implement this. This is for my self-training. 

 

is there any other way that I could use? Like, maybe File attributes? And you say Python script can help, do you mind elaborating this?

 

Thank you and have a great day ahead!


Hi team, 

 

I am new to A360 and is trying to play around with it.

 

I am implementing a triggering email based on the local file date modified (last modified date). An email should be triggered to a person when Today() is 5 months after the last modified date.

But I am struggling on how to get the file’s last modified date. 

Once I could get the last modified date, I could do the calculation to subtract Today with Last modified date and store it inside a variable to be used at the condition, to trigger the email. 

 

However, I am stuck here.

 

Appreciate if anyone could help me figure out how and how can I move forward.

 

Thank you and have a great day ahead.

 

  • Try Below points

  • Drag the “Get file information” action into your bot.

  • Provide the full file path (e.g., C:\Reports\sales.xlsx).

  • Assign the output to a dictionary variable.

  • Extract the lastModifiedDate from the dictionary.


Hi team, 

 

I am new to A360 and is trying to play around with it.

 

I am implementing a triggering email based on the local file date modified (last modified date). An email should be triggered to a person when Today() is 5 months after the last modified date.

But I am struggling on how to get the file’s last modified date. 

Once I could get the last modified date, I could do the calculation to subtract Today with Last modified date and store it inside a variable to be used at the condition, to trigger the email. 

 

However, I am stuck here.

 

Appreciate if anyone could help me figure out how and how can I move forward.

 

Thank you and have a great day ahead.

 

  • Try Below points

  • Drag the “Get file information” action into your bot.

  • Provide the full file path (e.g., C:\Reports\sales.xlsx).

  • Assign the output to a dictionary variable.

  • Extract the lastModifiedDate from the dictionary.

 

Correction. Just Modified would be enough.

 

Note: This is regarding the File-IO utilities and not the File package.


Hi ​@Padmakumar ,

 

I couldn’t find any Modified action from the action list. Can you guide me through?


Hi ​@Padmakumar ,

 

I couldn’t find any Modified action from the action list. Can you guide me through?

 

It is not an action. The output of the File Properties action of the File-IO Utilities is a dictionary variable. The key Modified is used to retrieve the last modified date from that dictionary variable.


@nisnisss ​@Padmakumar You would need to have your control room administrator add the File IO Utilities package to your control room.

https://botstore.automationanywhere.com/bot/file-io-utilities-package

My Python script returned the file creation date specifically here:

https://community.automationanywhere.com/developers-forum-36/file-created-date-86012?postid=98038#post98038 

To modify it to report the last modified date, the code would be:

import os, time
def getFileModifiedDate(filePath):
mtime = os.path.getmtime(filePath)
return time.ctime(mtime)

Hope that helps!


if file-io-utilities-package Package and Any Scripting is blocked in your organization, then you can create dll to get the file modified date.