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: Remove Spaces from a Variable
Topic Summary:
Created On: 05/31/2012 08:17 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 JasonCapo, on Friday, June 1, 2012 4:35 AM

Answer:
Thanks that did the trick!
 05/31/2012 08:17 AM
User is offline View Users Profile Print this message

Author Icon
JasonCapo
Student (5-19 posts)

Posts: 16
Joined: 11/11/2011

Hello,

I can't for the life of me figure this out.

I'm basically trying to do the following:

I'm looping through a directory and gathering the file names for all files and placing them into a variable.

(See attached Code)

Basically, this code works. I'm able to get all the files names, however it's adding a space at the end.

I'm trying to compare the files names from the variable with another list/variable. It never matches, because of the space.

How can I remove spaces from a variable? Perhaps, you all might have a better way to perform what I'm trying to do.

I appreciate the help.

 Category Survey



Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder)
 05/31/2012 09:46 AM
User is offline View Users Profile Print this message

Author Icon
Leonard Amabile
HelpSystems

Posts: 5454
Joined: 05/15/2007

Hi Jason,

You are creating the blank line by setting the variable to itself with a blank value. Try the attached code below:


 Category Survey
AutoMate 7 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)


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

Leonard Amabile | Director, Cross Platform Support
AutoMate | InterMapper | Skybot | Divisions of HelpSystems
T: +1.213.738.1700 | F: +1.213.738.7665
 06/01/2012 04:35 AM
User is offline View Users Profile Print this message

Author Icon
JasonCapo
Student (5-19 posts)

Posts: 16
Joined: 11/11/2011

Answer Answer
Thanks that did the trick!

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

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

Sitemap Network Automation Software Blog