INDEX.BAT @echo off cls if "%1"=="" goto usage if exist %1.txt goto mess echo. Please wait, listing files on CD drive to %1.txt. echo. dir /b /s f:\*.* > %1.txt goto end :mess echo. echo. %1.txt already exists. echo. Please use another number, echo. or delete %1.txt first. echo. goto exit :end echo. echo. %1.txt created successfully. echo. goto exit :usage echo. echo. Usage: index 040 (where 040 is the cd label number) echo. goto exit :exit rem END OF THIS BATCH FILE