Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Replacing spaces in paths and leaf filenames

No there's no such built-in replacement functionality for uploads.

It's no difficult to implement this though with use of some advanced scripting language (like PowerShell) and WinSCP .NET assembly.
SirClickalot

Replacing spaces in paths and leaf filenames

Is it anyway possible to replace all SPACES (%20) in the original path/filename with dashes (-)?
I have a had another read through the documentation but I cannot see anything obvious 'though there is a mention of 'replace' but I don't quite understand it.
Thank you
SirClickalot

Thank you Martin, just what I was looking for!
martin

Re: Trying to upload an entire directory structure in one hit

Use file-mask filter:
put -filemask=*.pdf * /public_html/assets/PDF/
SirClickalot

Trying to upload an entire directory structure in one hit

I have WinSCP working nicely at the command line (Windows 11) for single files in the 'current' directory- (i.e. the directory in which the batch file is located) directory using...
"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
  /log="C:\my-dir\WinSCP.log" /ini=nul ^
  /command ^
    "open ftp://username:password@host/ -rawsettings CacheDirectories=0 CacheDirectoryChanges=0" ^
    "put *.pdf /public_html/assets/PDF/" ^
    "exit"

But, what I really need is for ALL pdf files (and only pdf files) in the current directory AND all those in subdirectories PLUS I need the subdirectory structure to be honoured and created on the remote if they don't already exist.

Is that actually possible? – maybe I'm missing a simple switch but I cannot find it in the documentation.

Many thanks everyone
Nick