Network Automation Software
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: Updating a File Using a Local Variable
Topic Summary:
Created On: 06/25/2018 09:48 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.
 06/25/2018 09:48 AM
User is offline View Users Profile Print this message

Author Icon
GregPalios
n00b (>6 posts)

Posts: 1
Joined: 06/25/2018

I am trying to update a file once a month to change the date that is written in YYYYMMDD format. The file is on an FTP server, so I am downloading it on the first of the month, trying to write to it with the first day of the previous month, then I need to upload it back to the server.

I have successfully gotten the file to download, and I can write to it, but every time I try to add the custom variable, I am getting the error "Variable or function does not exist."

Not sure if it is even possible to write to a file using a variable, or it could be that I am using the incorrect syntax. I have included the code up to the point of trying to write to the file.


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


Edited: 06/25/2018 at 10:16 AM by GregPalios
 06/26/2018 03:13 AM
User is offline View Users Profile Print this message

Author Icon
StephenWoodward
n00b (>6 posts)

Posts: 2
Joined: 05/15/2012

-p44-51ge%file_date%
1-11 44-51 1713-1742
 06/28/2018 12:16 PM
User is offline View Users Profile Print this message

Author Icon
Justin Aucoin
HelpSystems

Posts: 360
Joined: 02/15/2016

Hi Greg,

Stephen is correct that the issue is with extra percent signs in the Write to file step. The way you have it written automate is evaluating %-p44-51ge% as the first variable or function, file_date as text, and %
1-11 44-51 1713-1742% as the second variable or function.

If the only variable or function in the action is file_date, then it should be written as he suggests.

-p44-51ge%file_date%
1-11 44-51 1713-1742

-------------------------

Justin Aucoin | Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700 | F: +1.213.738.7665
Statistics
18257 users are registered to the AutoMate Discussion forum.
There are currently 0 users logged in.
The most users ever online was 6686 on 11/01/2020 at 01:24 AM.
There are currently 958 guests browsing this forum, which makes a total of 958 users using this forum.

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

Sitemap Network Automation Software Blog