Posts tagged ‘relative path’


Relative batchfile paths

In a previous post “Batch file to perform SSH commands and transfer files from Windows to Linux” I used a batchfile to call on plink.exe as follows:


This is all well and good, but if this path changes for whatever reason (i.e. you save it to another directory or machine) then it won’t work.

There is an easy fix that gives the relative path, as long as the .bat and .exe are in the same directory:


Hope this proves useful.