So let's modify Fun.bat to accept two parameters. If you don't want the listing displayed on the screen, you can use the ">" character to direct the output to a file. It creates a directory listing of the folder specified as the first parameter that was passed to the batch file. The last command in the file is the DIR command. REM This file demonstrates the use of a few command-line statements Launch notepad in order to edit Fun.bat, which currently looks like OFF Specifically, we're working with a file called "C:\Bat\Fun.bat", so display a command prompt window and change your default directory to be C:\Bat. This tip builds on the tip titled Using Batch Files, Part 1, so you might want to check that out before proceeding.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |