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: Set Variable to File Name
Topic Summary: Set Variable to Unknown File Name
Created On: 03/24/2018 07:53 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.
Answer This question was answered by JamesSupancic, on Monday, March 26, 2018 12:26 PM

Answer:
Works great! Thanks Alex
 03/24/2018 07:53 AM
User is offline View Users Profile Print this message

Author Icon
JamesSupancic
Journeyman (50-99)

Posts: 85
Joined: 09/29/2005

I have set a trigger to watch for any new file showing up on my desktop with a *.qbo extension. What I would like to do, is set a variable to the file name that shows up. The downloaded file is somewhat random, and can be "Transactions-3889-2018-03-24.qbo". I would like to capture the "Transactions-3889-2018-03-24" part and set it to a variable %Tran%. I think this is simple, but can't seem to figure it out. Thanks for any help!

 Category Survey
 03/26/2018 06:58 AM
User is offline View Users Profile Print this message

Author Icon
Alex Escalante
HelpSystems

Posts: 871
Joined: 02/26/2014

Hello James,

You can accomplish this by using the the %AMTrigger.Filename% function.

Create your variable, then set it to %AMTrigger.Filename%. If you use a dialog box, you will see that this will show the triggering file name.

The only thing to keep in mind when using this function is that you will need an actual triggering file to run it, even in task builder mode. If you try to just run the job, it will error on this function.

Please let us know if this works for you.

 Category Survey


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

Alex Escalante | Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700 | F: +1.213.738.7665
 03/26/2018 12:26 PM
User is offline View Users Profile Print this message

Author Icon
JamesSupancic
Journeyman (50-99)

Posts: 85
Joined: 09/29/2005

Answer Answer
Works great! Thanks Alex

 Category Survey
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 599 guests browsing this forum, which makes a total of 599 users using this forum.

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

Sitemap Network Automation Software Blog