- FrontEnd
- No third party
- Java script
A simple frontend-only tool to resolve relative paths between files inside a folder. Users can upload a directory, and calculate the relative path from one file to another. No data is saved on the server; everything happens in the browser, making it safe and private.
- Upload an entire folder from your local system.
- Compute the relative path between two files.
- Output only the relative path (like
../folder_name/file_name.file_extension). - Works completely in the browser β no backend required.
- Safe and private: uploaded files are not stored anywhere.
-
Upload Directory
Use the folder upload input to select a directory. The browser reads all files and their relative paths usingFile.webkitRelativePath. -
Get Relative Path
Enter the From file and To file. The tool calculates the relative path using a custom JavaScript function:- Splits paths into parts.
- Finds the common base folder.
- Moves up from the source file to the common base.
- Moves down to the target file.
- Frontend-only: All operations happen in the browser.
- No files are uploaded to a server.
- No personal data is stored.
- Only the file names and relative paths are temporarily stored in memory during the session.
- Open
index.htmlin a modern browser (Chrome, Edge, etc.). - Click Upload Directory and select a folder.
- Use the Search box to find files.
- Enter the From file and To file, then click Get Relative Path.
- The relative path will be displayed below.
- Make sure to use folder upload (not individual files) for correct paths.
- The tool uses
webkitdirectoryβ currently supported in Chrome, Edge, and some Chromium-based browsers. - For best results, type the file names or partial paths accurately.
- HTML
- CSS
- JavaScript (Vanilla, ES6)
- Browser APIs (
File,FileList,webkitRelativePath)