I'm currently trying to learn Batch file scripting so maybe I'm just not seeing what I'm doing wrong but I am just making a very simple batch file that opens up a text file.
Here is the code I am using:
@echo off
title Opening a File Lesson
START "C:\Projects\batch\hi.txt"
pause
Instead of opening the textfile like it should, all it does is open the Batch File command prompt with the corresponding output:
Press any key to continue . . .
Which is fine, that's what I intended but then instead of opening the text file, it just opens ANOTHER command prompt with the file path: C:\Projects\batch\hi.txt as the caption and does absolutely nothing but output my default path:
Microsoft Windows [Version 6.1.7600] Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Projects>
Can someone guide me as to what I am doing wrong and why it's not opening with a default program? I tried opening other files too like Outlook and Visual Studio 2010 using the absolute(target) path and it does the same thing so its not just text files. Any help would be appreciated, I'm not used to scripting languages just yet.