Topic "Get file from changing Directory Name"

Author Message



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.
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24755
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

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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License