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

Re: SFTP Remote Path Folder name needs wildcard

Sorry, this is too vague. Are there other folder in the /folder? If there are, how do you identify the one you want to download? Is it the latest one? Is it the one with today's date in the file name? Do you have to use the file name for the decision? Cannot you you a file timestamp?
Hackathon2020

SFTP Remote Path Folder name needs wildcard

Hello! I'm dealing with a tricky issue right here. I need to download through sftp to local a file that is daily written on remote. The issue is that the remote source folder name it's changing daily with the format "folder_2020MMDDHHMMSS". Each day is created a new file at different hours, so the folder name will differ every day (cannot use get-date).
How can I use sort of wildcard in the remote source path?

I want to mention that I've tried get-childitem, resolvePath and invoke command, no luck at all.

any help, please

thank you
$session.GetFiles($sourcefolder,"destinationfolder", $false, $transferOptions).Check()

$sourcefolder it's something like :"/folder/folder_20200310223045"