Network Automation Software We are currently migrating this forum
over to our HelpSystems domain. Please
post all new threads in our new
HelpSystems Community Portal.
Post to the HelpSystems Forum
You are not currently logged on. You must be logged on in order to post. Log on
Or Create a new account
AutoMate Discussion
Decrease font size
Increase font size
Topic Title: Automate Task help - Archiving
Topic Summary: Archive job that moves files into folders with specific date format
Created On: 09/27/2012 07:43 AM
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
 09/27/2012 07:43 AM
User is offline View Users Profile Print this message

Author Icon
DanAllery
n00b (>6 posts)

Posts: 5
Joined: 09/26/2012

Hi,

I wanted to use the forum to ask this question.. but I am having trouble connecting to it...

I am trying to get my head around a move/archive operation that will move files with a certain age (the date of the file is in the filename itself) to another location. Also, the file will need to go into a different directory based on the date in the filename. The directory tree would be for example:

C:\archive\2011\06_June
                           \07_July ..etc..
                  \2012\01_January
                             \02_February ..etc..

If a file in the source directory is called Mi20110623_112333.asf [MiYYYYMMDD_hhnnss.asf], then it will be moved into this directory. If the directory does not exist, then it will create it.

I'm trying to utilise the loop through files action to store each filename (and path) into a variable but unsure how to use this data to fulfil what I need to do.

I'm having trouble getting the variable to work that outputs the data from the filename variable.

 

Regards
Dan

ps using Automate v6.1.1.0 on Windows Server2003

 



 Category Survey



Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder)


Edited: 09/27/2012 at 08:29 AM by DanAllery
 09/28/2012 03:55 AM
User is offline View Users Profile Print this message

Author Icon
JeanDelfosse
Supreme Guru (1000+)

Posts: 8883
Joined: 03/30/2005

Dan,
the first argument of format must be a true date (not a string) to deliver the right output.
See below

 Category Survey
AutoMate 6 version:
Windows version:



Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder)


-------------------------
Jean Delfosse - Automate Beta Tester
Win7 Pro 64 bits -Win XP Pro SP3 32 bits - AM8, AM7, BPA10, BPA9, BPA8, BPA7, AM6 Enterprise, AM4
 11/06/2012 09:09 AM
User is offline View Users Profile Print this message

Author Icon
DanAllery
n00b (>6 posts)

Posts: 5
Joined: 09/26/2012

Thanks by the way.. I've utilisied your steps to produce the following:

 



 Category Survey



Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder)
Statistics
18258 users are registered to the AutoMate Discussion forum.
There are currently 0 users logged in.
The most users ever online was 5551 on 01/08/2018 at 11:11 AM.
There are currently 3132 guests browsing this forum, which makes a total of 3132 users using this forum.

FuseTalk Enterprise Edition v4.0 - © 1999-2020 FuseTalk Inc. All rights reserved.

Sitemap Network Automation Software Blog