Post a reply

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

You are missing $:

$transferResult = $session.PutFiles($localPath, $remotePath, false, $transferOptions)
jason1500

Hi sorry just getting to this again, actually did a lazy work around and just put the subfolder above the folder with the files I needed to transfer but would still like to make it work the right way. I'm an idiot when it comes to scripting I don't know a damn thing except to find a script someone has been kind enough to publish and try to make it work for my needs.

Here's the part of the script I believe is relevant and what I did which doesn't work and errors out. if I don't put the false, transferoptions it says error unknown cmdlet.
 transferOptions.FileMask = "|*/";

        $transferResult = $session.PutFiles($localPath, $remotePath, false, transferOptions)

Thanks for any additional help
jason1500

Stop from uploading subdirectories?

Hi I pretty much know nothing when it comes to scripting but was able to use this script to fit my needs. https://winscp.net/eng/docs/script_local_move_after_successful_upload Specifically the .net assembly one. In the example the local path c:\uploads\* I need to make it so only the files immediately in c:\uploads get transferred right now when I run the script all the sub directories and files inside those subdirectories are getting transferred. What should I change so only the files top level files get transferred? Thanks so much