Windows CMD: get relative path from absolute path

How to get a relative path from an absolute path, for example. convert 'C: \ absolute \ path \ file.ext' to 'path'?

Thank you for your attention

edit: I would like to recursively scan a directory for a specific file type, and then create symbolic links for these folders containing this file type. symbolic links should be referred to as a directory containing the file type.

+4
source share
1 answer

This feature works DosTips.com: MakeRelative

It compares both patches and removes the same edge.
He then adds ".. \" for each inconsistent part.

+6
source

Source: https://habr.com/ru/post/1337314/


All Articles