Batch File

Hi All,

I Want to create a batch file which will open text file located on my computer.

regards Shalabh
more ▼

asked Apr 15 '12 at 12:10 AM in Default

shalabh21 gravatar image

51 8 11 12

(comments are locked)
10|1200 characters needed characters left

1 answer: sort oldest

You could create the batch file that has a call to Notepad with your filename. eg:

Notepad C:\MyFile.txt

(Don't forget to put the filename in double quotes - "C:\My File.txt" - if there's a space in the name)

Or you could create a batchfile which will accept a parameter, and open the file supplied:

Notepad %1

And call that with something like

MyBatchFile "C:\MyFile.txt"
Not quite sure what all this has to do with SQL Server, though!
more ▼

answered Apr 15 '12 at 06:29 AM

ThomasRushton gravatar image

ThomasRushton ♦
33.3k 14 20 44

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.



asked: Apr 15 '12 at 12:10 AM

Seen: 344 times

Last Updated: Apr 15 '12 at 06:29 AM