Topic "Problem with % character. To sent a printf command."

Author Message
gandalf
[View user's profile]

Joined: 2014-01-13
Posts: 1
Hi everyone,
I have a problem sending a command printf to a remote Linux server by sftp.

In a long /command that has always worked fine, I need to send a formatted printf like this:
etc.....| awk '{ printf ("%s;%s", ,$8,$5)}'`....etc

The problem is the special character % (I've tried with %25, but nothing changed).
How, can I do? Any suggeston?
Thanks

Best Regards Smile
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
How are you sending the command?
Please attach a full log file showing the problem (using the latest version of WinSCP).

To generate log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you may email it to me. You will find my address (if you log in) in my forum profile. Please include link back to this topic in your email. Also note in this topic that you have emailed the log.

_________________
Martin Prikryl
AlainM
[View user's profile]

Joined: 2014-03-08
Posts: 1
Location: FRANCE
Hi,
I use the scripting automation to transfer files, and everything works fine.
Just one exception, when I try to transfer the file "Got+questions%3F.png"

So, wincsp tranfers the file on the serveur (linux debian 6).
But the filename becomes "Got+questions?.png" on the linux server.

I understand that it is because "%3F" is understood as "?" (special character).
But, if I write "put Got+questions%253F.png", Winscp answers that the file "Got+questions%253F.png" doesn't exist (can't find it).

So, what do you think, how can I make Winscp not "understand" the code "%3F" in the filename, and correctly name the file on the linux server ?
Thanks a lot for your help,
Alain
winscp.jpg (617.67 KB) [Download]

Description: filename, before after

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
You have to turn off Replace ‘\:*?’ transfer settings option.
https://winscp.net/eng/docs/ui_transfer_custom

To turn it off in scripting, see:
https://winscp.net/eng/docs/faq_script_ini
_________________
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