PDA

View Full Version : Spaces


JustinA
08-15-2005, 06:57 PM
Im using net view to get computer names to text file
Then reading it to a table
Everything is working fine but when I Use the variables The Seem to have spaces like


%ComputerName1%\\C\Stuff

ends up being

\\Test \C\Stuff

If there a way to remove spaces in text file lines or even in a line of the table itself

bnkrazy
08-15-2005, 08:27 PM
Perhaps the String.TrimLeft/TrimRight functions?

Online Help Page (http://www.indigorose.com/webhelp/suf70/Program_Reference/Actions/String.TrimRight_Examples.htm)

JustinA
08-16-2005, 06:25 PM
That worked but created a new problem

x = result1;
y = 2;
if (x > y) then
ComputerNameA = ComputerNames[2];
ComputerName1 = String.TrimRight("ComputerNameA ", nil);
SessionVar.Set("%ComputerName1%", ComputerName1)
end

what i have it doing is pulling line 2 from table and saving it as computernameA but when i use the trim command it isnt pulling the data from
computernameA just using the word please help

JustinA
08-17-2005, 05:54 PM
Thought Alot more into that command and figured out how to get it to work

alot of steps in this but hey it works

x = result1;
y = 2;
if (x > y) then
ComputerNameA = ComputerNames[2];
SessionVar.Set("%ComputerName1%", ComputerNameA)
ComputerName1 = String.TrimRight (SessionVar.Expand("%ComputerName1% "), nil);
SessionVar.Set("%ComputerName1%", ComputerName1)