Open a file
Moderator: DosItHelp
-
- Posts: 1
- Joined: 24 Dec 2017 11:39
Open a file
I created an iso file using UltraISO. The file file system on that iso file is (Home\Memory\..\a.txt). how to open the a.txt using cmd.
Re: Open a file
You can't. You need to extract that file out of your ISO beforehand.
Steffen
Steffen
Re: Open a file
Alternatively you may mount the iso image.
For example under windows 10 this should open the file "test.txt" in the root directory of the iso image:Depending on your windows version you might need to install some "virtual disk software" and replace the mount and umount commands.
penpen
For example under windows 10 this should open the file "test.txt" in the root directory of the iso image:
Code: Select all
@echo off
setlocal enableExtensions disableDelayedExpansion
set "iso=.\cdimg.iso"
:: mount iso image
set "mountedVolume="
for %%a in ("%iso%") do for /F %%b in ('PowerShell -Command "Mount-DiskImage -ImagePath "%%~fa" -PassThru | Get-Volume"') do set "mountedVolume=%%~b"
:: use the iso image
notepad "%mountedVolume%:\test.txt"
:: unmount iso image
for %%a in ("%iso%") do PowerShell -Command Dismount-DiskImage -ImagePath "%%~fa"
endlocal
goto :eof
penpen