Trimming end of line extra space from output file generated by stsadm command line.
This is a question for a solution answered to another question i had. I applied the solution but ran into a little setback and i can't seem to resolve after trying a few options myself. to give a background of this issue, The other question and its solution is summarized below: When I ran stsadm -o enumsites -url http://.... command, and output the result output site properties information such as URL, owners name, content database name, storage space to a text file. but I only need the URL information to feed into another script for my use. I got the following commands in Windows PowerShell as a solution to the above question. Stsadm –o enumsites –url http://yourserver >C:\a.txt [xml]$xml = Get-Content C:\a.txt $xml.Sites.Site | select url $xml.Sites.Site | select url >C:\b.txt After that, only the site url info is exported to the b.txt file and you can feed it into your script. Now is the question I have: how do i remove the extra space at end of line entry in the b.txt file. I tried vbscript trim function and it failed with this b.txt file (generated from these command) but if i created a regular text file with extra space at end of line then the vbscript trim function worked fined. that what puzzled me. So if anyone have any advice or know how to resolve this. Please share. Thanks Swanl
June 9th, 2010 3:24am

I'm confused. You have a line saying "The question is". But then you have a line saying "the solution was for this". Do you have a question ? If so please amend your text to make it easier to follow. At the moment you seem to have a question followed by an answer. (Moderator)2010 Books: SPF 2010; SPS 2010; SPD 2010; InfoPath 2010; Workflow etc. 2007 Books: WSS 3.0; MOSS 2007; SPD 2007; InfoPath 2007; PerformancePoint; SSRS; Workflow Both lists also include books in French; German; Spanish with even more languages in the 2007 list.
Free Windows Admin Tool Kit Click here and download it now
June 9th, 2010 6:53am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics