Assuming your current work directory is dir2 being a subdirectory of dir1, you can refer to dir1 as ...
Assuming you have file1 in dir1, you can refer to it as ../file1.
Assuming you have file2 in dir2 that is your current work directory you can refer to it as ./file2 or simply file2.
So far, so good. Notice, though, that every file has a "short address" (the files name) and a "long address" (the fies name and its full path).
This works similar to telephone numbers: if you give someone your number without a regional area code and country code it will work as long as the person is in the same area as you.
123 456 789
But once outside this area you need to give him your area code too to make it work
0123 / 123 456 789
and to make sure the number works from whereever he is you will have to add the country code too:
+123 (123) 123 456 789
The same is true for files: you can address them by their name only, but then you will only find them if you happen to be in the same directory. If you aren't you won't. To make sure you find them regardless of where you are provide a full pathname instead. In this case the files name is not
As a general rule: to make sure files are always found regardless of from where you call a script use always the long form of (so-called) "absolute path names" when you address files inside scripts.
One word to the -r (recurse) options for diff or grep: they can only work if the directories are next to each other, and the strength is if the number of files is unknown. Not the case here, we have two known files.