Topic "Specal Character in File name"

Author Message
sivakl2001
[View user's profile]

Joined: 2010-11-20
Posts: 4
Location: Kuala Lumpur
Hi if special Character in filename i got the Error Message

Error Code : 2
File or Folder doesn't exist

p.Arguments = "/console /command " & """" & "option batch on" & """ " & """" & "open " & My.Settings.FTPUsername & ":" & My.Settings.FTPPassword & "@" & My.Settings.FTPIp & """ " & """" & "put " & My.Settings.DestinationPath & "\" & vgrid.Item(1, i).Value '& """ " & """" & "exit" & """"
Advertisements
sivakl2001
[View user's profile]

Joined: 2010-11-20
Posts: 4
Location: Kuala Lumpur
Hi sorry if the Filename contains SPACE couldn't upload file


sivakl2001 wrote:
Hi if special Character in filename i got the Error Message

Error Code : 2
File or Folder doesn't exist

p.Arguments = "/console /command " & """" & "option batch on" & """ " & """" & "open " & My.Settings.FTPUsername & ":" & My.Settings.FTPPassword & "@" & My.Settings.FTPIp & """ " & """" & "put " & My.Settings.DestinationPath & "\" & vgrid.Item(1, i).Value '& """ " & """" & "exit" & """"
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
So have you resolved your problem or not?
_________________
Martin Prikryl
sivakl2001
[View user's profile]

Joined: 2010-11-20
Posts: 4
Location: Kuala Lumpur
prikryl wrote:
So have you resolved your problem or not?

Not yet can uhelp me to solve this pbm
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
You need to enclose the file path to double-quotes
https://winscp.net/eng/docs/scripting#syntax
_________________
Martin Prikryl
sivakl2001
[View user's profile]

Joined: 2010-11-20
Posts: 4
Location: Kuala Lumpur
I try to put the file name inside the double quoute but still i couldn't upload filename with space

p.Arguments = "/console /command " & """" & "option batch on" & """ " & """" & "open " & My.Settings.FTPUsername & ":" & My.Settings.FTPPassword & "@" & My.Settings.FTPIp & """ " & """" & "put "" " & My.Settings.DestinationPath & "\" & vgrid.Item(1, i).Value '& " "" "" " & """" & "exit" & """"

how to change the current active directory by vb.net code
sivakl2001 wrote:
prikryl wrote:
So have you resolved your problem or not?

Not yet can uhelp me to solve this pbm
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
But in your case you need to quadruple the double-quotes actually. See also here:
https://winscp.net/eng/docs/commandline#syntax
_________________
Martin Prikryl
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