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.
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.
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'
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.
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.
| Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Running a command from inside a script, command line is corrupted | Raymond Vought | PowerShell | 4 | 24 Feb 2009 |
| What is the command line command for unzipping files? | Jim H | Vista General | 0 | 03 Dec 2008 |
Make a command prompt run a command as soon as it opens? | PainlessTorture | General Discussion | 11 | 17 Nov 2008 |
| Command Line Ren (Rename) command broken? | SixSigmaGuy | Vista General | 5 | 20 May 2008 |
| formatting command syntax like get-help or get-command | klumsy@xtra.co.nz | PowerShell | 1 | 18 Oct 2006 |