File path encoding to feature
You may encode each level and concatenate -
If we ignore the path till file1 as its same across all the names.
Then we need 1 digit for subfile and 2 digit for targetfile

c:/users/file1/subfile1/targetfile_0  - [0 00]
c:/users/file1/subfile1/targetfile_1  - [0 01]
c:/users/file1/subfile1/targetfile_2  - [0 10]
c:/users/file1/subfile2/targetfile_0  - [1 00]
c:/users/file1/subfile2/targetfile_1  - [1 01]
c:/users/file1/subfile2/targetfile_2  - [1 10]

Another approach can treat all paths as a feature. With this, you may try all the many encoding approaches e.g. Here.
+-----------+------------+--------------+
| Feature#1 | Feature#2  |  Feature#3   |
+-----------+------------+--------------+
| File_1    | Subfile_1  | Targetfile_1 |
| File_1    | Subfile_1  | Targetfile_2 |
| File_1    | Subfile_1  | Targetfile_3 |
+-----------+------------+--------------+