0

I know the title doesn't make sense, but I have one question. I have made this file called Test.bin and here's whats inside the .bin file:

echo Hello World

Since its a test file, I've been trying to see if i can make a batch file that can read the commands in the .bin file and output it onto the console.

2 Answers2

1

Not sure what you are trying to do exactly, but I think you have two options:

Rename test.bin as test.bat and run it with:

test

Start a new command interpreter and send it your commands:

cmd < test.bin
Mark Setchell
  • 191,897
  • 31
  • 273
  • 432
  • I have used the cmd < Test.bin string and it did what i wanted. Thank you Mark Setchell for the help! Now I need to play with it to get the program to work. – user3093687 May 25 '14 at 23:31
  • I suggest you to see: http://stackoverflow.com/questions/13320578/how-to-run-batch-script-with-out-using-bat-extention/13337597#13337597 – Aacini May 26 '14 at 00:18
0

You could also use the copy command. However, for this to work the test.bin file should be in the same directory/folder. Alternatively, you can specify the file's path.

Your code should look something like this:

@echo off
copy test.bin

Or, using the filepath method (pretending its on your desktop):

@echo off
copy C:/users/me/Desktop/test.bin