Page 1 of 1

filesnames that contain only numbers

Posted: 13 Mar 2017 16:15
by sbergami
hi to everyone,
I would need to configure a rule in filename.rules.conf that blocks the excel file if the name is composed only by numbers, for example 12345.xls.

I tried to enter

deny [0-9] \. xls $ - -
deny [0-9] \. .xlsx $ - -

but this block all excel files that contain at least one number.
What would be the correct syntax?
Thank you

Re: filesnames that contain only numbers

Posted: 13 Mar 2017 20:53
by shawniverson
Try this

Code: Select all

^[0-9]+\.xlsx$

Re: filesnames that contain only numbers

Posted: 14 Mar 2017 08:44
by sbergami
thank you for your quick relply
it works perfectly!
thank you very much