![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Scripting Explorer FTP Hi, I was wondering if there was an easy way to script the FTP functionality of the Windows Explorer shell. Why might I want to do this? Well, as you probably know, although FTP can handle multiple file transfers using 'MPUT', it cannot handle transferring a folder with all content and all recursive subfolders, unless you write some recursive scripts to do this. However, the Windows Explorer GUI FTP client does allow you to select an entire folder on a local drive and dump it into an FTP folder of your choice, all in one go. It strikes me that this should be something that is possible to script. I can start Explorer easily enough at the right location, e.g.: explorer.exe ftp://ftp.microsoft.com But I am not too sure where to go from there. My need is to upload the contents of a folder, including all recursive subfolders and their contents, to a remote FTP site. Ideally I would zip my stuff at the local end, transfer a single file and then unzip at the remote end. But I do not have sufficient permissions to ubzip on the remote server. FTP access is all I have. Any thoughts much appreciated, including any alternative ways of doing this if scripting the Explorer FTP GUI is not possible. Thanks... |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Scripting Explorer FTP http://blog.sapien.com/current/free-...transfers.html "holf" <holf@xxxxxx> wrote in message news:6B9707F4-447F-4362-A2F7-338BA9155D37@xxxxxx Quote: > Hi, > > I was wondering if there was an easy way to script the FTP functionality > of > the Windows Explorer shell. > > Why might I want to do this? Well, as you probably know, although FTP can > handle multiple file transfers using 'MPUT', it cannot handle transferring > a > folder with all content and all recursive subfolders, unless you write > some > recursive scripts to do this. > > However, the Windows Explorer GUI FTP client does allow you to select an > entire folder on a local drive and dump it into an FTP folder of your > choice, > all in one go. It strikes me that this should be something that is > possible > to script. > > I can start Explorer easily enough at the right location, e.g.: > explorer.exe ftp://ftp.microsoft.com > > But I am not too sure where to go from there. > > > My need is to upload the contents of a folder, including all recursive > subfolders and their contents, to a remote FTP site. > Ideally I would zip my stuff at the local end, transfer a single file and > then unzip at the remote end. But I do not have sufficient permissions to > ubzip on the remote server. FTP access is all I have. > > Any thoughts much appreciated, including any alternative ways of doing > this > if scripting the Explorer FTP GUI is not possible. > > Thanks... |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Scripting Explorer FTP Thanks Brandon, that looks very promising and I will probably end up using it. I guess I will have to write some recursive routines to parse my directory tree and copy everything across folder by folder. I have no problem doing that in C# or VB.net, but I am pretty new to Powershell so it's going to be an interesting learning experience. Thanks for the link. "Brandon Shell" wrote: Quote: > http://blog.sapien.com/current/free-...transfers.html > > "holf" <holf@xxxxxx> wrote in message > news:6B9707F4-447F-4362-A2F7-338BA9155D37@xxxxxx Quote: > > Hi, > > > > I was wondering if there was an easy way to script the FTP functionality > > of > > the Windows Explorer shell. > > > > Why might I want to do this? Well, as you probably know, although FTP can > > handle multiple file transfers using 'MPUT', it cannot handle transferring > > a > > folder with all content and all recursive subfolders, unless you write > > some > > recursive scripts to do this. > > > > However, the Windows Explorer GUI FTP client does allow you to select an > > entire folder on a local drive and dump it into an FTP folder of your > > choice, > > all in one go. It strikes me that this should be something that is > > possible > > to script. > > > > I can start Explorer easily enough at the right location, e.g.: > > explorer.exe ftp://ftp.microsoft.com > > > > But I am not too sure where to go from there. > > > > > > My need is to upload the contents of a folder, including all recursive > > subfolders and their contents, to a remote FTP site. > > Ideally I would zip my stuff at the local end, transfer a single file and > > then unzip at the remote end. But I do not have sufficient permissions to > > ubzip on the remote server. FTP access is all I have. > > > > Any thoughts much appreciated, including any alternative ways of doing > > this > > if scripting the Explorer FTP GUI is not possible. > > > > Thanks... > |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Scripting Explorer FTP I have never used Don's (sapien) cmdlets... but I will help any way I can. Let me download it and see what I can do quickly "holf" <holf@xxxxxx> wrote in message news:AF987B46-0DDE-440A-BC4B-3EFF382487B6@xxxxxx Quote: > Thanks Brandon, that looks very promising and I will probably end up using > it. > > I guess I will have to write some recursive routines to parse my directory > tree and copy everything across folder by folder. I have no problem doing > that in C# or VB.net, but I am pretty new to Powershell so it's going to > be > an interesting learning experience. > > Thanks for the link. > > > > "Brandon Shell" wrote: > Quote: >> http://blog.sapien.com/current/free-...transfers.html >> >> "holf" <holf@xxxxxx> wrote in message >> news:6B9707F4-447F-4362-A2F7-338BA9155D37@xxxxxx Quote: >> > Hi, >> > >> > I was wondering if there was an easy way to script the FTP >> > functionality >> > of >> > the Windows Explorer shell. >> > >> > Why might I want to do this? Well, as you probably know, although FTP >> > can >> > handle multiple file transfers using 'MPUT', it cannot handle >> > transferring >> > a >> > folder with all content and all recursive subfolders, unless you write >> > some >> > recursive scripts to do this. >> > >> > However, the Windows Explorer GUI FTP client does allow you to select >> > an >> > entire folder on a local drive and dump it into an FTP folder of your >> > choice, >> > all in one go. It strikes me that this should be something that is >> > possible >> > to script. >> > >> > I can start Explorer easily enough at the right location, e.g.: >> > explorer.exe ftp://ftp.microsoft.com >> > >> > But I am not too sure where to go from there. >> > >> > >> > My need is to upload the contents of a folder, including all recursive >> > subfolders and their contents, to a remote FTP site. >> > Ideally I would zip my stuff at the local end, transfer a single file >> > and >> > then unzip at the remote end. But I do not have sufficient permissions >> > to >> > ubzip on the remote server. FTP access is all I have. >> > >> > Any thoughts much appreciated, including any alternative ways of doing >> > this >> > if scripting the Explorer FTP GUI is not possible. >> > >> > Thanks... >> |
My System Specs![]() |
| | #5 (permalink) |
| | Re: Scripting Explorer FTP nm... Shay has done it already http://scriptolog.blogspot.com/2007/...utomation.html "Brandon Shell" <tshell.mask@xxxxxx> wrote in message news:uXUihPK$HHA.1188@xxxxxx Quote: >I have never used Don's (sapien) cmdlets... but I will help any way I can. >Let me download it and see what I can do quickly > > "holf" <holf@xxxxxx> wrote in message > news:AF987B46-0DDE-440A-BC4B-3EFF382487B6@xxxxxx Quote: >> Thanks Brandon, that looks very promising and I will probably end up >> using it. >> >> I guess I will have to write some recursive routines to parse my >> directory >> tree and copy everything across folder by folder. I have no problem doing >> that in C# or VB.net, but I am pretty new to Powershell so it's going to >> be >> an interesting learning experience. >> >> Thanks for the link. >> >> >> >> "Brandon Shell" wrote: >> Quote: >>> http://blog.sapien.com/current/free-...transfers.html >>> >>> "holf" <holf@xxxxxx> wrote in message >>> news:6B9707F4-447F-4362-A2F7-338BA9155D37@xxxxxx >>> > Hi, >>> > >>> > I was wondering if there was an easy way to script the FTP >>> > functionality >>> > of >>> > the Windows Explorer shell. >>> > >>> > Why might I want to do this? Well, as you probably know, although FTP >>> > can >>> > handle multiple file transfers using 'MPUT', it cannot handle >>> > transferring >>> > a >>> > folder with all content and all recursive subfolders, unless you write >>> > some >>> > recursive scripts to do this. >>> > >>> > However, the Windows Explorer GUI FTP client does allow you to select >>> > an >>> > entire folder on a local drive and dump it into an FTP folder of your >>> > choice, >>> > all in one go. It strikes me that this should be something that is >>> > possible >>> > to script. >>> > >>> > I can start Explorer easily enough at the right location, e.g.: >>> > explorer.exe ftp://ftp.microsoft.com >>> > >>> > But I am not too sure where to go from there. >>> > >>> > >>> > My need is to upload the contents of a folder, including all recursive >>> > subfolders and their contents, to a remote FTP site. >>> > Ideally I would zip my stuff at the local end, transfer a single file >>> > and >>> > then unzip at the remote end. But I do not have sufficient permissions >>> > to >>> > ubzip on the remote server. FTP access is all I have. >>> > >>> > Any thoughts much appreciated, including any alternative ways of doing >>> > this >>> > if scripting the Explorer FTP GUI is not possible. >>> > >>> > Thanks... >>> >>> |
My System Specs![]() |
| | #6 (permalink) |
| | Re: Scripting Explorer FTP Thanks... that's very helpful. "Brandon Shell" wrote: Quote: > nm... Shay has done it already > http://scriptolog.blogspot.com/2007/...utomation.html > > "Brandon Shell" <tshell.mask@xxxxxx> wrote in message > news:uXUihPK$HHA.1188@xxxxxx Quote: > >I have never used Don's (sapien) cmdlets... but I will help any way I can. > >Let me download it and see what I can do quickly > > > > "holf" <holf@xxxxxx> wrote in message > > news:AF987B46-0DDE-440A-BC4B-3EFF382487B6@xxxxxx Quote: > >> Thanks Brandon, that looks very promising and I will probably end up > >> using it. > >> > >> I guess I will have to write some recursive routines to parse my > >> directory > >> tree and copy everything across folder by folder. I have no problem doing > >> that in C# or VB.net, but I am pretty new to Powershell so it's going to > >> be > >> an interesting learning experience. > >> > >> Thanks for the link. > >> > >> > >> > >> "Brandon Shell" wrote: > >> > >>> http://blog.sapien.com/current/free-...transfers.html > >>> > >>> "holf" <holf@xxxxxx> wrote in message > >>> news:6B9707F4-447F-4362-A2F7-338BA9155D37@xxxxxx > >>> > Hi, > >>> > > >>> > I was wondering if there was an easy way to script the FTP > >>> > functionality > >>> > of > >>> > the Windows Explorer shell. > >>> > > >>> > Why might I want to do this? Well, as you probably know, although FTP > >>> > can > >>> > handle multiple file transfers using 'MPUT', it cannot handle > >>> > transferring > >>> > a > >>> > folder with all content and all recursive subfolders, unless you write > >>> > some > >>> > recursive scripts to do this. > >>> > > >>> > However, the Windows Explorer GUI FTP client does allow you to select > >>> > an > >>> > entire folder on a local drive and dump it into an FTP folder of your > >>> > choice, > >>> > all in one go. It strikes me that this should be something that is > >>> > possible > >>> > to script. > >>> > > >>> > I can start Explorer easily enough at the right location, e.g.: > >>> > explorer.exe ftp://ftp.microsoft.com > >>> > > >>> > But I am not too sure where to go from there. > >>> > > >>> > > >>> > My need is to upload the contents of a folder, including all recursive > >>> > subfolders and their contents, to a remote FTP site. > >>> > Ideally I would zip my stuff at the local end, transfer a single file > >>> > and > >>> > then unzip at the remote end. But I do not have sufficient permissions > >>> > to > >>> > ubzip on the remote server. FTP access is all I have. > >>> > > >>> > Any thoughts much appreciated, including any alternative ways of doing > >>> > this > >>> > if scripting the Explorer FTP GUI is not possible. > >>> > > >>> > Thanks... > >>> > >>> > |
My System Specs![]() |
| | #7 (permalink) |
| | Re: Scripting Explorer FTP I've had a look into this. Unfortunately the COM dll mentioned only has methods for 'get' and 'put'. I'll need to be creating folders, traversing folder trees etc. So either I need something more fully featured that I can access from Powershell, or I'll have to call something else which will do the job (such as the Explorer Shell). Alternatively, I've thought of another approach. I can run ASP.net on my host, so I could just upload a single ZIP file and then run an ASP.net page on the server which will decompress everything into the right place. Seems like the best solution as it minimises transfer bandwidth. Thanks again for you thoughts on all this. "holf" wrote: Quote: > Thanks... that's very helpful. > > "Brandon Shell" wrote: > Quote: > > nm... Shay has done it already > > http://scriptolog.blogspot.com/2007/...utomation.html > > > > "Brandon Shell" <tshell.mask@xxxxxx> wrote in message > > news:uXUihPK$HHA.1188@xxxxxx Quote: > > >I have never used Don's (sapien) cmdlets... but I will help any way I can. > > >Let me download it and see what I can do quickly > > > > > > "holf" <holf@xxxxxx> wrote in message > > > news:AF987B46-0DDE-440A-BC4B-3EFF382487B6@xxxxxx > > >> Thanks Brandon, that looks very promising and I will probably end up > > >> using it. > > >> > > >> I guess I will have to write some recursive routines to parse my > > >> directory > > >> tree and copy everything across folder by folder. I have no problem doing > > >> that in C# or VB.net, but I am pretty new to Powershell so it's going to > > >> be > > >> an interesting learning experience. > > >> > > >> Thanks for the link. > > >> > > >> > > >> > > >> "Brandon Shell" wrote: > > >> > > >>> http://blog.sapien.com/current/free-...transfers.html > > >>> > > >>> "holf" <holf@xxxxxx> wrote in message > > >>> news:6B9707F4-447F-4362-A2F7-338BA9155D37@xxxxxx > > >>> > Hi, > > >>> > > > >>> > I was wondering if there was an easy way to script the FTP > > >>> > functionality > > >>> > of > > >>> > the Windows Explorer shell. > > >>> > > > >>> > Why might I want to do this? Well, as you probably know, although FTP > > >>> > can > > >>> > handle multiple file transfers using 'MPUT', it cannot handle > > >>> > transferring > > >>> > a > > >>> > folder with all content and all recursive subfolders, unless you write > > >>> > some > > >>> > recursive scripts to do this. > > >>> > > > >>> > However, the Windows Explorer GUI FTP client does allow you to select > > >>> > an > > >>> > entire folder on a local drive and dump it into an FTP folder of your > > >>> > choice, > > >>> > all in one go. It strikes me that this should be something that is > > >>> > possible > > >>> > to script. > > >>> > > > >>> > I can start Explorer easily enough at the right location, e.g.: > > >>> > explorer.exe ftp://ftp.microsoft.com > > >>> > > > >>> > But I am not too sure where to go from there. > > >>> > > > >>> > > > >>> > My need is to upload the contents of a folder, including all recursive > > >>> > subfolders and their contents, to a remote FTP site. > > >>> > Ideally I would zip my stuff at the local end, transfer a single file > > >>> > and > > >>> > then unzip at the remote end. But I do not have sufficient permissions > > >>> > to > > >>> > ubzip on the remote server. FTP access is all I have. > > >>> > > > >>> > Any thoughts much appreciated, including any alternative ways of doing > > >>> > this > > >>> > if scripting the Explorer FTP GUI is not possible. > > >>> > > > >>> > Thanks... > > >>> > > >>> > > > > > |
My System Specs![]() |
| | #8 (permalink) |
| | Re: Scripting Explorer FTP Hmmm... Don is on here occasionally, maybe he can comment. I will also see what I can find... I thought there was a FTPClient in the Framework. "holf" <holf@xxxxxx> wrote in message news:8F1B567C-EEEB-45AF-BF64-2DA2C3C14F3D@xxxxxx Quote: > I've had a look into this. Unfortunately the COM dll mentioned only has > methods for 'get' and 'put'. I'll need to be creating folders, traversing > folder trees etc. So either I need something more fully featured that I > can > access from Powershell, or I'll have to call something else which will do > the > job (such as the Explorer Shell). > > > Alternatively, I've thought of another approach. I can run ASP.net on my > host, so I could just upload a single ZIP file and then run an ASP.net > page > on the server which will decompress everything into the right place. > > Seems like the best solution as it minimises transfer bandwidth. > > > Thanks again for you thoughts on all this. > > > > "holf" wrote: > Quote: >> Thanks... that's very helpful. >> >> "Brandon Shell" wrote: >> Quote: >> > nm... Shay has done it already >> > http://scriptolog.blogspot.com/2007/...utomation.html >> > >> > "Brandon Shell" <tshell.mask@xxxxxx> wrote in message >> > news:uXUihPK$HHA.1188@xxxxxx >> > >I have never used Don's (sapien) cmdlets... but I will help any way I >> > >can. >> > >Let me download it and see what I can do quickly >> > > >> > > "holf" <holf@xxxxxx> wrote in message >> > > news:AF987B46-0DDE-440A-BC4B-3EFF382487B6@xxxxxx >> > >> Thanks Brandon, that looks very promising and I will probably end up >> > >> using it. >> > >> >> > >> I guess I will have to write some recursive routines to parse my >> > >> directory >> > >> tree and copy everything across folder by folder. I have no problem >> > >> doing >> > >> that in C# or VB.net, but I am pretty new to Powershell so it's >> > >> going to >> > >> be >> > >> an interesting learning experience. >> > >> >> > >> Thanks for the link. >> > >> >> > >> >> > >> >> > >> "Brandon Shell" wrote: >> > >> >> > >>> http://blog.sapien.com/current/free-...transfers.html >> > >>> >> > >>> "holf" <holf@xxxxxx> wrote in message >> > >>> news:6B9707F4-447F-4362-A2F7-338BA9155D37@xxxxxx >> > >>> > Hi, >> > >>> > >> > >>> > I was wondering if there was an easy way to script the FTP >> > >>> > functionality >> > >>> > of >> > >>> > the Windows Explorer shell. >> > >>> > >> > >>> > Why might I want to do this? Well, as you probably know, although >> > >>> > FTP >> > >>> > can >> > >>> > handle multiple file transfers using 'MPUT', it cannot handle >> > >>> > transferring >> > >>> > a >> > >>> > folder with all content and all recursive subfolders, unless you >> > >>> > write >> > >>> > some >> > >>> > recursive scripts to do this. >> > >>> > >> > >>> > However, the Windows Explorer GUI FTP client does allow you to >> > >>> > select >> > >>> > an >> > >>> > entire folder on a local drive and dump it into an FTP folder of >> > >>> > your >> > >>> > choice, >> > >>> > all in one go. It strikes me that this should be something that >> > >>> > is >> > >>> > possible >> > >>> > to script. >> > >>> > >> > >>> > I can start Explorer easily enough at the right location, e.g.: >> > >>> > explorer.exe ftp://ftp.microsoft.com >> > >>> > >> > >>> > But I am not too sure where to go from there. >> > >>> > >> > >>> > >> > >>> > My need is to upload the contents of a folder, including all >> > >>> > recursive >> > >>> > subfolders and their contents, to a remote FTP site. >> > >>> > Ideally I would zip my stuff at the local end, transfer a single >> > >>> > file >> > >>> > and >> > >>> > then unzip at the remote end. But I do not have sufficient >> > >>> > permissions >> > >>> > to >> > >>> > ubzip on the remote server. FTP access is all I have. >> > >>> > >> > >>> > Any thoughts much appreciated, including any alternative ways of >> > >>> > doing >> > >>> > this >> > >>> > if scripting the Explorer FTP GUI is not possible. >> > >>> > >> > >>> > Thanks... >> > >>> >> > >>> >> > > >> > >> > |
My System Specs![]() |
| | #9 (permalink) |
| | Re: Scripting Explorer FTP On Sep 22, 4:12 am, holf <h...@xxxxxx> wrote: Quote: > I've had a look into this. Unfortunately the COM dll mentioned only has > methods for 'get' and 'put'. I'll need to be creating folders, traversing > folder trees etc. So either I need something more fully featured that I can > access from Powershell, or I'll have to call something else which will do the > job (such as the Explorer Shell). www.nsoftware.com/powershell/. Lance http://geekswithblogs.net/Lance |
My System Specs![]() |
| | #10 (permalink) |
| | Re: Scripting Explorer FTP Thanks, Lance. I've ended up uploading a Zip file and then using ASP.net to do the unpacking at the other end. It is working well so I'll probably stick with that. Thanks very much to Brandon and Lance for their replies. "Lance" wrote: Quote: > On Sep 22, 4:12 am, holf <h...@xxxxxx> wrote: Quote: > > I've had a look into this. Unfortunately the COM dll mentioned only has > > methods for 'get' and 'put'. I'll need to be creating folders, traversing > > folder trees etc. So either I need something more fully featured that I can > > access from Powershell, or I'll have to call something else which will do the > > job (such as the Explorer Shell). > The NetCmdlets get-ftp and send-ftp cmdlets can handle this: > www.nsoftware.com/powershell/. > > Lance > http://geekswithblogs.net/Lance > > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Scripting question | Vista General | |||
| PS Scripting Issue | PowerShell | |||
| VB scripting help | VB Script | |||
| UAC and scripting | Vista General | |||
| Scripting bug? | PowerShell | |||