comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » parse subdirectories
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: parse subdirectories [message #94259 is a reply to message #92808] Wed, 15 March 2017 04:06 Go to previous messageGo to previous message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
On Tuesday, March 14, 2017 at 12:04:15 AM UTC+1, Helder wrote:
> Thanks for the insight Wayne.
> I think I will go for the sort/count slashes option. Otherwise programming is no fun.
> Cheers, Helder

Hi,
I was just about to give up on this because I noticed that if the output directory is too long, Windows shortens the directories and adds three dots. Something like this:
K:\firstDir\secondDir\thirdDir\four...
instead of
K:\firstDir\secondDir\thirdDir\fourthDir\

This is literaly what is returned by the spawn command:
spawn, 'powershell -WindowStyle Hidden "Get-ChildItem -Recurse | ?{ $_.PSIsContainer } | Select-Object FullName"', result, /noshell

After fiddling around with cmd and powershell, I found finally the answer from stackoverflow:
http://stackoverflow.com/questions/9528039/powershell-why-do es-out-file-break-long-line-into-smaller-lines

So this now works better:
spawn, 'powershell -WindowStyle Hidden "Get-ChildItem -Recurse | ?{ $_.PSIsContainer } | Select-Object FullName | Format-list *"', result, /noShell

There is still however a little problem with overflowing lines. This is simply dealt with by searching for those lines that do not contain ":" and moving the content to the previous line...

Cheers,
Helder
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Harris seems to be deemphasizing IDL
Next Topic: Problem writing SCATTERPLOT() with more than 4096 points to PDF file

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 20:52:10 PDT 2025

Total time taken to generate the page: 1.20262 seconds