Hey guys I need help creating a batch file or at least getting started. Here's what I have to do.
1.ask the user for the name of a directory using user defined variables.
2.Ask the user for text to insert into a file using user defined variables.
3. Get a list of all.txt files located in the c:\\ drive and save it to a file called text.list.txt using bare format. Use user and system variables. .
Any help would be very much appreciated.
THANKS!!!!
Help with batch file
Moderator: DosItHelp
Re: Help with batch file
Please increase your verbose level
Generally, using SET /P.
But what kind of "user defined variables" should be used?
Only one line? In this case you could use SET /P as well. You can write the content of the variable to a file by echo-redirection.
A list of .txt files in the c: root or in the entire c: volume? What means "bare format" and which user and system variables do you want to use and why?
Regards
aGerman
mattman5791 wrote:1.ask the user for the name of a directory using user defined variables.
Generally, using SET /P.
Code: Select all
set /p "folder=Enter the directory name: "
But what kind of "user defined variables" should be used?
mattman5791 wrote:2.Ask the user for text to insert into a file using user defined variables.
Only one line? In this case you could use SET /P as well. You can write the content of the variable to a file by echo-redirection.
mattman5791 wrote:3. Get a list of all.txt files located in the c:\\ drive and save it to a file called text.list.txt using bare format. Use user and system variables. .
A list of .txt files in the c: root or in the entire c: volume? What means "bare format" and which user and system variables do you want to use and why?
Regards
aGerman