I have a problem with the variable %CD% in a batch-file. It adds a backslash if the script is run from the root of a drive.
as an example: updatedir=%CD%\Update & echo %updatedir% will return something like
- From a folder E:\New Folder\Update
- From a drive root E:\\Update
Is there any way to get rid of the extra backslash if run from root?