I read that the htaccess/AuthName text does not get displayed on the login popup on chrome so I need an alternative.
The "alternative" is to role your own authentication system (which could still use HTTP Authentication together with your own server-side scripts) - which is beyond the scope of this answer (and Webmasters SE). (HINT: You would need to implement a front-controller pattern and rewrite these requests to your server-side script that then handles the authentication and response back to the client.)
A workaround is to set a custom "401 Unauthorised" response (either a simple text string or complete HTML page) with your desired message. But this is only displayed when authentication fails, ie. the user enters an invalid username/password combo and hits "OK" or the password dialog is cancelled.
NB: You still need to set the AuthName directive as this also determines which username/password combo the browser sends as part of the request (after successful authentication).
For example:
# Simple text string
ErrorDocument 401 "Sorry about this, please contact xxx@example.com for a username and password"
OR
# Complete HTML error document containing custom response
ErrorDocument 401 /errordocs/401.html
Then, how you protect the "specific files" really depends on the filenames and perhaps how many.
For example, if there is a pattern to the filenames, eg. They all start with the word "example" then you could wrap the authentication directives in a <Files> wrapper:
<Files "example*.*">
# Authentication directives go here...
AuthType Basic
AuthName "Protected File"
AuthUserFile "/absolute/file/path/to/password-file"
Require valid-user
</Files>
The Files directive uses simple wildcard matching. Use FilesMatch to match against a regex. For example, to match a hand full of unrelated .html files then you could do something like:
<FilesMatch "^(one|two|three|four|five)\.html$">
# Authentication directives go here (see above)
:
</FilesMatch>
If you have many files then perhaps consider setting an environment variable when one of these files is requested and use this env var in the authentication directives. For example (Apache 2.4):
# Set the AUTH_REQUIRED env var if a protected file is requested
SetEnvIf Request_URI "^/one\.html$" AUTH_REQUIRED
SetEnvIf Request_URI "^/two\.html$" AUTH_REQUIRED
SetEnvIf Request_URI "^/three\.html$" AUTH_REQUIRED
SetEnvIf Request_URI "^/four\.html$" AUTH_REQUIRED
SetEnvIf Request_URI "^/five\.html$" AUTH_REQUIRED
Authentication...
<RequireAny>
<RequireAll>
# Unrestricted access to non-protected files
Require all granted
Require not env AUTH_REQUIRED
</RequireAll>
<RequireAll>
# Authentication directives go here (see above)
:
</RequireAll>
</RequireAny>
Alternatively, use an Apache <If> expression:
# Authentication...
<If "reqenv('AUTH_REQUIRED') == '1'">
# Authentication directives go here (see above)
:
</If>
Although, strictly speaking, the above (SetEnvIf directive) is checking the requested URL-path, not the underlying file-path.
This last example is also dependent on other directives you might have in your .htaccess file. For example, if you are doing any URL rewriting then then the above env var may be renamed to REDIRECT_AUTH_REQUIRED. And you will need to check for this in the authentication directives instead.