Intelligent Automation & Macro Software  

Go Back   Automation Anywhere, Inc. Forums > Products Zone > Automation Anywhere
Register FAQ Search Today's Posts Mark Forums Read

Automation Anywhere Post messages and questions related to Automation Software here.


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-11-2010, 01:53 PM
trentonponder trentonponder is offline
Senior Member
 
Join Date: Jan 2009
Posts: 100
Default Extract 'Modified Date' From File Name

Is there a method to pull the 'Modified' or 'created' date from a file when looping through 'All Files in a folder?'
Reply With Quote
  #2 (permalink)  
Old 06-14-2010, 04:11 PM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 1,342
Default

Hello,

You can check for or get the files modified/created at particular date for e.g. you can get files created today, one day before, two days before likewise or files created between two dates using File.

If you can elaborate your requirement, we can provide appropriate solution.

Hope that helps.
Reply With Quote
  #3 (permalink)  
Old 06-15-2010, 05:44 AM
trentonponder trentonponder is offline
Senior Member
 
Join Date: Jan 2009
Posts: 100
Default

I need to loop through a folder containing 50k files. For each file, I need to extract the name and created or modified date and insert the information into a database.

I understand your suggestion, but it would seem if there is a way to specify to only get files created within a particular date range that there would also be a way to extract the create date to a variable.
Reply With Quote
  #4 (permalink)  
Old 06-15-2010, 04:57 PM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 1,342
Default

Hello,

In that case, we can create simple VB script to get the last modified date of given file and call this script from Automation Anywhere using 'Run Script' command. You can pass parameter to the command i.e the file path and can get modified date returned in Automation Anywhere variable, which you can insert into your database.

We have created a sample vb script and task for your convenience. To run this sample,

. Please copy .atmn under location, 'C:\...\My Documents\Automation Anywhere\Automation Anywhere\My Tasks' folder.

. Copy .vbs under C:\.

. You may need to change the location of folder path at line #2 as per your requirement.

This task will log the filename and last modified date of respective file in C:\Temp.txt
Attached Files
File Type: zip sample.zip (769 Bytes, 7 views)
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -7. The time now is 07:29 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.0 ©2007, Crawlability, Inc.
Copyright © 2003-2011 Automation Anywhere, Inc. All rights reserved