![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
![]()
I have always checked a command line on the CMD black screen prior to inserting it into a .bak file, and it has always worked.
Well, I ran into a problem with the script to open a text file, say "C:\users\myfile.txt" This works when used on the black screen, but not when placed into a .bak file, which is then executed. The file does not open. Any thoughts on what the problem is? Thanks for all suggestions. |
Ads |
#2
|
|||
|
|||
![]()
On 4/12/2021 1:59 PM, Ivan Denisovich wrote:
I have always checked a command line on the CMD black screen prior to inserting it into a .bak file, and it has always worked. Well, I ran into a problem with the script to open a text file, say "C:\users\myfile.txt" This works when used on the black screen, but not when placed into a .bak file, which is then executed. The file does not open. Any thoughts on what the problem is? Thanks for all suggestions. Ivan: I think that should be a file with a ".BAT" extension (as in BATCH) file. John -- \\\||/// ------------------o000----(o)(o)----000o---------------- ----------------------------()-------------------------- '' Madness takes its toll - Please have exact change. '' |
#3
|
|||
|
|||
![]()
On Monday, April 12, 2021 at 1:59:06 PM UTC-5, John Dulak wrote:
On 4/12/2021 1:59 PM, Ivan Denisovich wrote: I have always checked a command line on the CMD black screen prior to inserting it into a .bak file, and it has always worked. Well, I ran into a problem with the script to open a text file, say "C:\users\myfile.txt" This works when used on the black screen, but not when placed into a .bak file, which is then executed. The file does not open. Any thoughts on what the problem is? Thanks for all suggestions. Ivan: I think that should be a file with a ".BAT" extension (as in BATCH) file. With my apologies John, I miswrote. The file is, in fact, ".bat". Any thoughts about the problem I described? Thanks for posting, and sorry again for my mistake. |
#4
|
|||
|
|||
![]()
On 4/12/2021 1:59 PM, Ivan Denisovich wrote:
I have always checked a command line on the CMD black screen prior to inserting it into a .bak file, and it has always worked. Well, I ran into a problem with the script to open a text file, say "C:\users\myfile.txt" This works when used on the black screen, but not when placed into a .bak file, which is then executed. The file does not open. Any thoughts on what the problem is? Thanks for all suggestions. Ivan: If the filename has spaces or odd characters in it it should be enclosed in quotation marks. Other than that I can't think of anything. IIRC there used to be a Usenet group devoted to batch files. You might get better answers there. John -- \\\||/// ------------------o000----(o)(o)----000o---------------- ----------------------------()-------------------------- '' Madness takes its toll - Please have exact change. '' |
#5
|
|||
|
|||
![]()
On Mon, 12 Apr 2021 13:29:21 -0700 (PDT), Ivan Denisovich wrote:
With my apologies John, I miswrote. The file is, in fact, ".bat". Any thoughts about the problem I described? Thanks for posting, and sorry again for my mistake. It could probably due to broken file type association. Check with the ASSOC and FTYPE commands. e.g. C:\assoc .bat ..bat=batfile C:\ftype batfile batfile="%1" %* |
#6
|
|||
|
|||
![]()
On Tuesday, April 13, 2021 at 4:20:41 AM UTC-5, JJ wrote:
On Mon, 12 Apr 2021 13:29:21 -0700 (PDT), Ivan Denisovich wrote: With my apologies John, I miswrote. The file is, in fact, ".bat". Any thoughts about the problem I described? Thanks for posting, and sorry again for my mistake. It could probably due to broken file type association. Check with the ASSOC and FTYPE commands. e.g. C:\assoc .bat .bat=batfile C:\ftype batfile batfile="%1" %* I will try both suggestions. Many thanks to you & john for your help. |
Thread Tools | |
Display Modes | |
|
|