One possible solution is to set an environment variable from a build parameter in teamcity and then having the test look for this environment variable in order to determine what to run.
If you choose build parameters from the configuration steps menu and add a new build paramater and then choose the type as EnvironmentVariable (.env)
you can set the to some value like 'all' for when you want to run all the tests and some other value when you want to run a restricted set.
You might be able to create a template which does not have a value set for this build parameter, then have one instance of the template which sets the 'all' value, for the automated test run. Then have another build based on this template which doesn't set a value for this, which you use for manual runs. I believe that if you have not set a value for the parameter then TeamCity will prompt you for it when you try and run the build (but I'm not certain about that)
Once you have defined a variable called env.file_path_contains
in teamcity then you can access its value in your tests using this code:
System.Environment.GetEnvironmentVariable("file_path_contains")