#1 18 Feb 2021 11:10

New Member
Registered: 29 Apr 2018
Posts: 2

assoc errorLevel

# First:  Check ErrorLevel and set ErrorLevel

> echo %errorLevel%

> (call)
> echo %errorLevel%

> (call )
> echo %errorLevel%

# … now we know to set errorLevel to Zero: (call ) and set to one: (call)
# so we can use "assoc" command:

> assoc .jpg

> echo %errorLevel%

> ftype jpgfile
Dateityp "jpgfile" nicht gefunden, oder diesem Dateityp wurde kein Öffnen-Befehl zugeordnet.

# my system is german and say me: no file-assoc found

> echo %errorLevel%

# can't find an Explanation of this behavior on "ss64.cmd.assoc" and "*.ftype"
# can you help me?


#2 18 Feb 2021 14:21

Simon Sheppard
Super Administrator
Registered: 27 Aug 2005
Posts: 1,103

Re: assoc errorLevel

The file type you are looking for is jpegfile not jpgfile, and thats why it threw an error,

The error codes for these commands don't seem to be documented anywhere, though perhaps we could work them out.
Also the file types can seemingly only be found by digging through the registry, (Windows 7 used to expose them in the file association settings dialogue.)

File associations seem to be one of the most crusty areas in Windows, I get the impression the developers just want to sweep it all under the carpet and discourage users from changing anything.


Board footer

Powered by FluxBB