Stop from uploading subdirectories?

Advertisement

jason1500
Joined:
Posts:
4
Location:
nj

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

Reply with quote

Advertisement

jason1500
Joined:
Posts:
4
Location:
nj

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

Reply with quote

Advertisement

You can post new topics in this forum