x
login about faq Site discussion (meta-askssc)

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

shalabh21
51 5 8 11

(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 ♦
29.3k 6 9 36

(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.

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments



Facebook logo Follow Ask SSC on Facebook
Find Ask SSC on Google+
linkedin logo Find us on LinkedIn

Topics:

x7

asked: Apr 15 '12 at 12:10 AM

Seen: 176 times

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

Copyright © 2002-2012 Simple Talk Publishing. All Rights Reserved. If you have any queries, please contact the site administrators.
Ask SQL Server Central is a community service provided by Red Gate.