Download only specific files, recursively, best first compressed

Advertisement

cavo789
Joined:
Posts:
1
Location:
Lincent (Belgium)

Download only specific files, recursively, best first compressed

Hi all

This is my first post after having first searched on the net if someone has already give an answer but I've not found (sorry if I've miss something).

My question : I would like to only download PHP files that are presents in a specific folder (subfolders included).

Real world situation : I need to clean an hacked website. That site contains a /upload folder with an incredible number of folders and subfolders and almost one gigabytes of files. There are here, and there, and also there, .php scripts created by bots and hackers.

My need (dream?) is : can I ask WinSCP to scan the remote folder, recursively, and download on my machine only specific files ? (in my case, .php files)

Would be great if these files can, first, be compressed on the remote server first so the result will be the donwload of a single archive on my machine.

Thanks a million !

Christophe

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,567
Location:
Prague, Czechia

Re: Download only specific files, recursively, best first compressed

You can specify a file mask, both in scripting and GUI (it looks like you actually do not need a script for your one-off task).
https://winscp.net/eng/docs/ui_transfer_custom
https://winscp.net/eng/docs/file_mask

Would be great if these files can, first, be compressed on the remote server first so the result will be the donwload of a single archive on my machine.
There's no way WinSCP can ask the server to compress the files first. It's doable in a shell (if you have a shell access). But that's off-topic for this forum.

Reply with quote

Advertisement

You can post new topics in this forum