Topic "Spaces in filenames..."

Author Message
Floatingshed

Guest


Hello,

I need to occasionally delete a remote file so I've written a simple gui that inserts the filename into a command line and executes it. This is my command line:

"c:\Program Files\winscp\winscp.com" /command "option batch abort" "option confirm off" "open ftp://password:username@server.com" "rm /Temp/File_to_delete.plp" "exit"

It works fine unless the filename has any spaces in it. In that case I get a file not found error, normally this is fixed by putting the whole filename and path in quotes, but it already is!

Any help much appreciated.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
See
http://winscp.net/eng/docs/commandline#syntax

I.e. the correct syntax is:

Code:
"c:\Program Files\winscp\winscp.com" /command "option batch abort" "option confirm off" "open ftp://password:username@server.com" "rm ""/Temp/File_to_delete.plp""" "exit"

_________________
Martin Prikryl
Guest




Excellent, works a treat. Thanks
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License