In DOS, if you want to create a folder with the name "WDCWD1600AAJS-00B4A0" based on the content in a txt document where that part is in the "Model" line, you can do the following steps:
First, you need to extract the model name from the txt file. Assuming the txt file is named "diskinfo.txt", you can use a batch script to do this. Here is a simple batch script example:
```batch
@echo off
for /f "tokens=2 delims=: " %%a in (diskinfo.txt) do (
if "%%a"=="Model" (
set model=%%b
md "!model!"
goto :end
)
)
:end
```
You can save the above code as a `.bat` file, put it in the same directory as the `diskinfo.txt` file, and then run it. This script will find the line with "Model" in the `diskinfo.txt` file, extract the model name, and create a folder with that name.
Please note that this is a basic example, and you may need to adjust it according to the actual situation.
[ Last edited by min2nan on 2011-1-5 at 19:50 ]
First, you need to extract the model name from the txt file. Assuming the txt file is named "diskinfo.txt", you can use a batch script to do this. Here is a simple batch script example:
```batch
@echo off
for /f "tokens=2 delims=: " %%a in (diskinfo.txt) do (
if "%%a"=="Model" (
set model=%%b
md "!model!"
goto :end
)
)
:end
```
You can save the above code as a `.bat` file, put it in the same directory as the `diskinfo.txt` file, and then run it. This script will find the line with "Model" in the `diskinfo.txt` file, extract the model name, and create a folder with that name.
Please note that this is a basic example, and you may need to adjust it according to the actual situation.
[ Last edited by min2nan on 2011-1-5 at 19:50 ]
