File Name with Relative Path or Absolute Path
Should I provide file name with Relative Path or Absolute Path?
When provide a file name, you have choice of using relative path or absolute path:
1. If you provide a file name with an absolute path, the system will go to the directory of the given path to locate the file.
Providing an absolute path is a good practice for Windows system files or installed program files. Because those files are usually installed in fixed directories.
For example: "C:\windows\System32\cmd.exe" has the absolute path. The system will go to "\windows\System32" on drive C to find the file.
2. If you provide a file name with a relative path, the system will start from the current directory and follow the given path to reach the target directory to locate the file.
Providing a relative path is a good practice for a program to locate its supporting files like configuration files and library files, Because those files are usually installed together with the program in sub-directories.
For example, the following commands shows you how to run the java.exe program with a library file given in relative path name format "..\lib\plugin.jar":
C:\fyicenter>cd "\Program Files (x86)\Java\jre6\bin" C:\Program Files (x86)\Java\jre6\bin>java.exe -jar ..\lib\plugin.jar
2017-12-05, 112👍, 0💬
What is service "wudfsvc" and library "wudfsvc.dll" on Windows Vista? "wudfsvc" is a system service ...
How to open a Web Archive (.mht or .mhtml) file correctly in Firefox browser? I converted a word doc...
What contents are stored in a Web Archive (.mht) file? When you convert a word document into a singl...
What is "Microsoft .NET Framework NGEN v4.0.30319_X86" in my Windows 7 service list? And how is "Mic...
How to add a password to stop other people opening my PowerPoint file? I want share a PowerPoint fil...