createISO.js
is a Node.js script for creating an ISO file from a specified directory. It uses the mkisofs
command, ensuring that file case sensitivity is preserved and allowing for the customization of the volume name.
- Node.js installed on your system.
mkisofs
tool must be installed and accessible in your system's PATH.
Clone the repository or download the script to your local machine.
To use the script, follow these steps:
-
Open your terminal or command prompt.
-
Navigate to the directory where
createISO.js
is located. -
Run the script with the directory path you want to convert into an ISO file as an argument.
node createISO.js [path_to_directory]
Replace
[path_to_directory]
with the path to the directory you want to convert.
node createISO.js /path/to/my/directory
The createISO.js
script operates as follows:
- It first checks if the provided directory exists.
- If the directory exists, the script uses the
mkisofs
command to create an ISO file. This file will have the same name as the directory being converted. - The created ISO file is stored in the same directory as the
createISO.js
script.
The script is designed to handle errors gracefully:
- Directory Does Not Exist: If the specified directory path does not exist, the script will output an error message indicating the issue.
- mkisofs Command Errors: If there are any errors during the execution of the
mkisofs
command, the script will display relevant error information, helping in troubleshooting.