Filtering uploaded files with a certain regexp

Advertisement

momento878
Joined:
Posts:
2

Filtering uploaded files with a certain regexp

Hi

a number of workers in my department are using WinSCP (Version 3.8.2) to upload files to the server.
some of the time they upload files with names that contain invalid characters like ";" or "?" etc.

I would like to limit the files that are uploaded to a certain pattern, here it is in regular expression systax:
[a-z0-9\_\.\-]+

meaning that any filename that contains a character that is not one of following:
a to b (case insensitive), any digit, "_" , "." or "-"
will be prevented from uploading.
I've tried to do this using file masks but I could not manage to apply the above using the built in mask systax.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
28,811
Location:
Prague, Czechia

Re: Filtering uploaded files with a certain regexp

This is rather task for the server to enforce the rules.
_________________
Martin Prikryl

Reply with quote

momento878
Joined:
Posts:
2

Re: Filtering uploaded files with a certain regexp

martin wrote:

This is rather task for the server to enforce the rules.

so I understand this can't be done in WinSCP ?

our system administrator doesn't know of a way to enforce these rules - if you know of a way to do this please advise.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
28,811
Location:
Prague, Czechia

Re: Filtering uploaded files with a certain regexp

momento878 wrote:

so I understand this can't be done in WinSCP ?
Correct.
_________________
Martin Prikryl

Reply with quote

Advertisement

You can post new topics in this forum