FTYPE doesn't work as per docs

  • Thread starter Thread starter Sal
  • Start date Start date
S

Sal

The cmd prompt command FTYPE doesn't work as per the "/?" help
documentation. It says that if you type the command with an associated
file type, it will delete the open command string for that file type.
But it doesn't work. For example, if I enter:

C:\>FTYPE FileType=

Where FileType equals any associated file type, it returns:

File type 'FileType' not found or no open command associated with it.
 
That is not the way I read the "/?" help.
Don't use the "=" sign with nothing following.
e.g.
FTYPE piffile

....Alan
 
Alan said:
That is not the way I read the "/?" help.
Don't use the "=" sign with nothing following.
e.g.
FTYPE piffile

...Alan
I think you both are on the wrong track. This is the help:
=====================================================================
Displays or modifies file types used in file extension associations

FTYPE [fileType[=[openCommandString]]]

fileType Specifies the file type to examine or change
openCommandString Specifies the open command to use when launching files
of this type.

Type FTYPE without parameters to display the current file types that
have open command strings defined. FTYPE is invoked with just a file
type, it displays the current open command string for that file type.
Specify nothing for the open command string and the FTYPE command will
delete the open command string for the file type. Within an open
command string %0 or %1 are substituted with the file name being
launched through the assocation. %* gets all the parameters and %2
gets the 1st parameter, %3 the second, etc. %~n gets all the remaining
parameters starting with the nth parameter, where n may be between 2 and 9,
inclusive. For example:

ASSOC .pl=PerlScript
FTYPE PerlScript=perl.exe %1 %*
========================================================

See the last lines.
You don't type "filetype" its supposed to be the file type, not the
word filetype.

ASSOC .txt=notepad
FTYPE notepad=notepad.exe %1

I would think an alternate would be:
FTYPE .txt=notepad.exe %1
 
Back
Top