Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > PowerShell

command ftp

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 07-02-2008   #1 (permalink)
Naum
Guest


 

command ftp

Hi,plz tell me why command:
ftp -s:"c:\ftp.txt"
in CMD work and in Powershell - it show me all options of ftp command and
dont work.

My System SpecsSystem Spec
Old 07-03-2008   #2 (permalink)
sapienscripter's Avatar
Scripting Guru


Join Date: Jun 2008
Vista Ultimate 32bit
Syracuse, NY
 
Rep Power: 8
sapienscripter has a spectacular aura aboutsapienscripter has a spectacular aura aboutsapienscripter has a spectacular aura about
  sapienscripter is offline

Re: command ftp

That's an excellent question. It doesn't make sense other than a bug of some sort. Here's a work around for PowerShell:

cmd /c 'ftp -s:c:\ftp.txt'
My System SpecsSystem Spec
Old 07-03-2008   #3 (permalink)
sapienscripter's Avatar
Scripting Guru


Join Date: Jun 2008
Vista Ultimate 32bit
Syracuse, NY
 
Rep Power: 8
sapienscripter has a spectacular aura aboutsapienscripter has a spectacular aura aboutsapienscripter has a spectacular aura about
  sapienscripter is offline

Re: command ftp

I stumbled upon a fix:

ftp '-s:ftp.txt'

Not sure why this is required for this parameter other than maybe something with the PowerShell parser that doesn't like the punctuation.
My System SpecsSystem Spec
Old 07-03-2008   #4 (permalink)
sapienscripter's Avatar
Scripting Guru


Join Date: Jun 2008
Vista Ultimate 32bit
Syracuse, NY
 
Rep Power: 8
sapienscripter has a spectacular aura aboutsapienscripter has a spectacular aura aboutsapienscripter has a spectacular aura about
  sapienscripter is offline

Re: command ftp

the PowerShell parser sees the -s and tries to parse it as a PowerShell parameter when it really isnt'. Use my fix to get around this. Another alternative is to use the free FTP com object from SAPIEN (SAPIEN Technologies, Inc. - VBScript Editor, PowerShell Editor, ASP Editor, ActionScript Editor, PHP Editor, and more.). Shay has some nice PowerShell functions also ready to go for this at $cript Fanatic: FTP transfers automation.
My System SpecsSystem Spec
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Command Line Ren (Rename) command broken? SixSigmaGuy Vista General 5 05-20-2008 05:52 AM
Command prompt "COPY" command not working in brand new Windows Vis CMD COPY command not working in Vista Vista file management 7 02-05-2008 03:20 PM
formatting command syntax like get-help or get-command klumsy@xtra.co.nz PowerShell 1 10-18-2006 12:04 PM
net use command =?Utf-8?B?Z2xlbm5fOTcxMjQ=?= Vista General 2 08-07-2006 03:48 PM
Executing a command like run [command] Singee PowerShell 5 06-05-2006 02:17 PM


Vistax64.com 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 2005-2008

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 47 48 49 50 51