I've been trying to create batch file for converting files in a directory. The directory is being given via this code:
@echo off
rem // setting input directory
:input1
set/p "inputdir=Input directory: "
rem // if input is invalid, prompt again
if not exist "%inputdir%" (
echo Directory does not exist.
echo "%inputdir%"
goto input1
)
It works well - normally. However, because I've considered using environmental variables later on, I also tried running it as administrator. However - the problem is, that when i run it normally, it takes the directory, script continues without a problem. When I run in administrator more, it acts as "Directory does not exist"
It works normally for locations on C: and D: drives, this issue comes up for O: and P: drives, which are made by subst.
Any idea how to solve this problem? Thank you