Topic "Get file from changing Directory Name"

Author Message
RonJ

Guest


Hi

I am trying to automate the downloading a file for backup purposes, however, the last part of the directory from which the file is stored changes on a nightly basis which is beyond my control although the directory structure remains the same ie: /Folder1 (This folder name changes daily with the last few characters changing)/Folder2/File.

Is there a way using the get command to download the file using wildcards for the top directory (Folder1).

I have attempted to use various combinations of which the system cannot find the file specified ie: get "/Fol*/Folder2/File1.

Any assistance would be humbly appreciated.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
No it is not possible. But it easy to write a PowerShell script with use of WinSCP .NET assembly to find the name of the top-level directory.

Start here https://winscp.net/eng/docs/library_example_listing_files_matching_wildcard
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