“文件类型关联”;使用应用程序或程序打开文件。 [英] "File type association"; with an app or program on the opening of a file.

查看:143
本文介绍了“文件类型关联”;使用应用程序或程序打开文件。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过示例解释问题:


somefile.txt是一个简单的文本文件,但是我们知道许多程序和应用程序都可以打开它。


所以问题是:如果设置了打开属性,打开属性窗口,说出记事本;然后windows为所有以txt文件类型结尾的简单文本文件设置此属性。


因此,当Notepad ++打开somefile1.txt时,例如;从打开的菜单中直接打开这个文件有一个问题。


当然我们可以先打开Notepad ++,然后选择somefile1.txt,但是这种方式与文件关联相悖。


真正证明这一点的是,如果一个人在同一台计算机上使用Python 2.7和3.6,两个程序都有用于运行和编辑程序的空闲GUI界面,并且都将程序脚本保存为somepy3。 py或somepy2.py,它们具有相同的文件类型,
例如.py,因此windows为Python 2.7和Python 3.6提供相同的文件关联,但Python 2.7脚本在代码中使用不同的格式到Python 3.6因此,在脚本运行时出现
代码格式的差异时,在Idle for 3.6中为2.7编写的运行脚本将会失败。


有没有办法让独立具有相同.filetype的文件的文件关联 


非常感谢预期回复 


关心Susan Bruce 。




Susan 7 of 7

解决方案

< blockquote>

通过使用"打开方式"解决此问题右键单击文件时从上下文菜单中进行选择。 从与文件扩展名相关联的应用程序中选择您选择的应用程序。




如果您考虑一下,如何系统会知道你提出的"独立文件关联"中的哪一个。应该使用的唯一可用信息是用户双击文档文件吗?


To explain the problem by example:

somefile.txt is a simple text file however it can be opened by many programs and app's as we know.

So the problem is this: If the opens with property is set, by opening the properties window, to say Notepad; then windows sets this property for all simple text files ending with txt file type.

So when somefile1.txt is to be opened by Notepad++ for example; there is a problem in directly opening this file from the open menu.

Of course we can open Notepad++ first then select somefile1.txt, however this kind of defeats the point in having file associations.

What really demonstrates this point is if one is using Python 2.7 and 3.6 on the same computer as both programs have Idle GUI interface for running and editing programs, and both save program scripts as somepy3.py or somepy2.py, they have the same file type, eg .py and so windows makes the same file association for both Python 2.7 and Python 3.6, however Python 2.7 scripts use a different format in there code to Python 3.6 so running scripts written for 2.7 in Idle for 3.6 will fail as soon as a disparity in the code format appears during the scripts run time.

Is there a way of making independent file associations for files with the same .filetype 

Many thanks in anticipation of replies 

Regards Susan Bruce.


Susan 7 of 7

解决方案

This problem is solved by using the "Open with" choice from the context menu when right clicking on a file.  Select the application of your choice from those that are associated with the file's extension.

If you think about it, how would the system know which of your proposed "independent file associations" should be used if the only information available to it is a user's double clicking on a document file?


这篇关于“文件类型关联”;使用应用程序或程序打开文件。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆