Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - List FTP Directories

Reply
 
Old 02-20-2008   #1 (permalink)
Bushman


 
 

List FTP Directories

I am writing a script to manage an FTP site, after some research i
found two clases in .NET, webclient and ftpwbrequest. i got stuck in
the ftpwebrequest.method assignment so i decided to use webclient. My
question is, how do i get a directory listing with the webclient
object so that i can use the values to walk the directory like my
previous filesystem post.

My System SpecsSystem Spec
Old 02-20-2008   #2 (permalink)
Shay Levi


 
 

Re: List FTP Directories

Hi

You can use /n software's NetCmdlets. The current release contains more than
30 Cmdlets providing access to network and host protocols such as SNMP, LDAP,
DNS, Syslog, HTTP, WebDav, FTP, SMTP, POP, IMAP, Rexec/RShell, Telnet, and
more.

NetCmdlets is available for FREE for non-commercial use. Check out the NetCmdlets
hobbyist license:
http://www.nsoftware.com/order/options.aspx?part=NCP1-A



-----
Shay Levi
$cript Fanatic
http://scriptolog.blogspot.com
Quote:

> I am writing a script to manage an FTP site, after some research i
> found two clases in .NET, webclient and ftpwbrequest. i got stuck in
> the ftpwebrequest.method assignment so i decided to use webclient. My
> question is, how do i get a directory listing with the webclient
> object so that i can use the values to walk the directory like my
> previous filesystem post.
>

My System SpecsSystem Spec
Old 02-20-2008   #3 (permalink)
Hal Rottenberg


 
 

Re: List FTP Directories

Bushman wrote:
Quote:

> I am writing a script to manage an FTP site, after some research i
> found two clases in .NET, webclient and ftpwbrequest. i got stuck in
> the ftpwebrequest.method assignment so i decided to use webclient.
I'm not sure how far you can get with webclient, it really doesn't have a lot to
offer here. I think any listing you could get back would be in the form of the
string representation that is seen in IE when you go to an FTP site. In other
words, $wc.downloadstring().

So what steered you off of ftpclient? We can work on that if you want. Or you
can go the netcmdlets route, those cmdlets are pretty neat.

--

Hal Rottenberg
Blog: http://halr9000.com
Webmaster, Psi (http://psi-im.org)
Co-host, PowerScripting Podcast (http://powerscripting.net)
My System SpecsSystem Spec
Old 03-04-2008   #4 (permalink)
Bushman


 
 

Re: List FTP Directories

On Feb 20, 7:31*pm, Hal Rottenberg <h...@xxxxxx> wrote:
Quote:

> Bushmanwrote:
Quote:

> > I am writing a script to manage an FTP site, after some research i
> > found two clases in .NET, webclient and ftpwbrequest. i got stuck in
> > the ftpwebrequest.method assignment so i decided to use webclient.
>
> I'm not sure how far you can get with webclient, it really doesn't have a lot to
> offer here. *I think any listing you could get back would be in the formof the
> string representation that is seen in IE when you go to an FTP site. *Inother
> words, $wc.downloadstring().
>
> So what steered you off of ftpclient? *We can work on that if you want. *Or you
> can go the netcmdlets route, those cmdlets are pretty neat.
>
> --
>
> Hal Rottenberg
> Blog:http://halr9000.com
> Webmaster, Psi (http://psi-im.org)
> Co-host, PowerScripting Podcast (http://powerscripting.net)
Do you know an ftp client i can script? i am trying to use powershell
for all my scripting if possible.
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
List only directories with numbers VB Script
Working om directories PowerShell
FTP whole directories? Vista General
merge directories Vista General
Optimizing PS Script to List directories PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46