So for example i need to check if file C:\windows\system32\whatever.dll lies in c:\windows. Is it possible in a manner like if not exists ..., but here if %file% lies in %directory% ?
edit: I know the path to the file I’m looking for. The problem boils down to comparing strings, that is checking if path to the directory is contained at the beginning in a path to the file.
you can do something like
in this way you create a full file-pathname like “c:\myfolder\yourfolder\myfile.txt” and check for it’s existence
Update
this should works (but it’s not tested)
prefix/postfix doublequte, so that you can add your own without
having unexpected double-doublequote (that will obviously mess things
up)
Here is a list of useful syntax for FOR variables (from the help of the FOR command)