If you talk about the location path of the files, you should establish it relatively.
Examples of location:
Absolute: C: \ User \ Desktop \ program_folder \ file_folder \ file.txt
Relative: file_file \ file.txt
These two will work the same but if you change the program folder to another pc, only the relative will work.
I explain the example, in the absolute location the hard disk name appears and you are a user, etc. Things that usually change between each pc so the absolute location or full location will not work on another pc. Instead, the relative position begins to search from the place where the program is located so if the file is in a folder inside the main solution ('folder') of your program you just have to put the name of the folder that contains the file and then the name of the file ('file_folder \ file.txt').
If the file folder is not within the solution of the program you can use the relative location with the colon rule:
Example of a file inside a folder that is on the desktop like the program, as in this case the folder of the file is not inside the program, we can not access it just by entering the name but we must to exit the program folder and then enter the file folder.
Example:
Complete locations:
Program: c: \ user \ Desktop \ program_folder \ program.exe
Reference file: c: \ Desktop \ folder_file \ file.txt
These are the locations that would not work on another PC.
Relative locations:
To refer to the reference file, you should only do the following:
.. \ file_folder \ file.txt
If you notice the two points return to the container or parent folder is the desktop where the program folder and file folder is located so that with two points at the beginning of our chain we indicate that you return back to the parent folder and then enter the file folder and find the file.txt.
I hope this documentation will help you.
File path
Simple Explanation:
Example:
You have your program on the desktop inside a folder called program_folder , inside which is your program program.exe .
You also have the excel files in a folder that is on the desktop with the name of carpeta_excel inside it you have your excel file called excel.xlsx . . p>
If you want your program to work on any computer when you put the address of your file in programming, you use the relative form. In this case it would be:
..\carpeta_excel\excel.xls
And your program will work with that route on any computer that uses the program.
Why is it in the other section of the answer.