Shell Execution Problem
Shell Execution Problem
(OP)
Hi. I was triing to do some stuff on ms dos with qb using shell command.
When I type ;
Start > Run > cmd.exe
and then type
'ftype txtfile'
it runs but when I use command in qb;
'Shell "ftype txtfile"
it fails.
I really wonder why it doesn't work with qb while it works with cmd?
my MSDOS version is 5.0
Thanks a lot.
When I type ;
Start > Run > cmd.exe
and then type
'ftype txtfile'
it runs but when I use command in qb;
'Shell "ftype txtfile"
it fails.
I really wonder why it doesn't work with qb while it works with cmd?
my MSDOS version is 5.0
Thanks a lot.
RE: Shell Execution Problem
memory is limited when shelling, but from the command prompt or Start>run you probably have more memory available for the program.
Otherwise we would need to know more about the program(s)
to arrive at a valid conclusion
RE: Shell Execution Problem
Shell "ftype.exe txtfile"
Add water (makes its own sauce).
RE: Shell Execution Problem
(XP) and used cmd.exe to get to the prompt then cd to the folder containing hello and typed hello and it worked fine.
So, don't know what to tell you unless im missing something here.
RE: Shell Execution Problem
SHELL "c:\utilities\ftype.exe txtfile"
Just replace “utilities” in the above example with the directory path to the ftype.exe program. And this will only work if the textfile is located in the same directory as the ftype.exe program; otherwise you will need to specify the path for the txtfile after the ftype.exe program just like you did with the program itself.
Hope this helps.
RE: Shell Execution Problem
RE: Shell Execution Problem
but it apparently works
that means it is internal command of CMD.EXE
So you can call it as
CMD.EXE /C FTYPE txtfile
like this:
SHELL "CMD.EXE /C FTYPE txtfile"
(checked with QBasic on XP Prof SP2, it works )