I am not entirely sure whether it belongs here, but considering the
question and the answers I would say it does.
Italics: copied from the COMMAND PROMPT.
Assumptions
When we talk about mounting we usually talk about mounting (virtual) disks, for which we have DISKPART.EXE, or installation files like .WIM and .SWM, for which we have DISM.EXE (IMAGEX.EXE), or third party software like 'NTLite', or it concerns CD and DVD images like .ISO. As far as I know .ISO-files are always mounted read only, unless third party software is used. As such .ISO-files are the most inflexible files and thus I wrote this from the assumption that the question was asked at the time to provide a correct and complete path to the source-file for one or more copy commands, a find command, or a read command, each of them depending on a well-defined path to a source-file, not necessarily the path to the mounted image.
One Possible Solution#
c:\windows\system32>powershell.exe mount-diskimage -imagepath
"d:\blah\vlah.iso" -confirm -passthru
Attached : True
Blocksize : 0
Devicepath : \\.\CDROM0 <<== Object of interest, since COPY.EXE
Filesize : 4586569728 won't recurse and XCOPY.EXE
Imagepath : "d:\blah\vlah.iso" won't accept it as a valid
Logicalsectorsize : 2048 path, however ROBOCOPY.EXE
Number : 0 will accept it and then it does
Size : 4586569728 do what I demand of it, copy the
Storagetype : 1 contents of the mounted .ISO
Pscomputername :
xcopy \\.\CDROM0\*.* C:\new /h /i /c /k /e /r /y /f /b
Invalid drive specification
0 File(s) copied
Robocopy \\.\CDROM0 C:\new /E /ZB /COPYALL /256 /R:3 /W:1 /X /V /TS
/FP /NP /ETA /LOG:w:\ROBO.LOG /TEE /NJH
Arguably, this combination is the most effective to both answer the question, and solve the problem since POWERSHELL.EXE won't open a 'gui',(so all feedback 'stdout' and 'stderr', when allowed, will appear in one window), while it delivers us 'stdout' that makes the necessity to obtain a drive letter superfluous to your file and/or command a waste of time. If I am correct the 'devicepath' will always be the same, though I have not checked that, and I cannot say whether that is only on my computer the case.
Issue Concerning The Use Of POWERSHELL.EXE Via The COMMAND PROPMT
One issue though, it might be my computer, but better repeat the POWERSHELL.EXE command, because with me and my batch-files most of the times 'Attached : False' is the outcome of the first try, both with mounting, (false), as well as 'unmounting' the image, (true). That will cause an error in the execution of my or your 'Batch-file' that looks something like: 'The system cannot find the path specified.' That will follow the moment another command will reference the intended 'mountpoint' and image.
ADDENDUM 05-feb-2017: I found out that the solution of using \.\CDROMX seems to only work when one adds /256 otherwise it may fail with the following message:
2017/02/05 01:11:15 ERROR 53 (0x00000035) Accessing Source Directory \.\CDROM0\
The network path was not found.
I hope this helps people, this helped me already, following notepad long line setting: 72 creates an ugly layout on stackoverflow.