0

I would like to specify that images of a certain type (for example, .png) open by default in a program I've written when the file is contained in a certain directory. I've seen by searching (Change Default Program for a specific folder) that this is not possible on Windows 7 or 8.

I am saving these images in this directory myself, so I have some leeway with how I name the files. For example, I could change the filename a bit... perhaps to be example.myprog.png or something similar. Is there a way to set it up so files that match this filename pattern get opened, while other .pngs (in other directories) still open in the default viewer?

I don't really want to name these PNG images example.myprog (i.e., fully change the extension), because when the user is browsing the directory in Windows Explorer, I would like the thumbnail images to still show up. Also, users will be eventually transferring these images to their own machines, where they'll want to use standard image viewers to look at them.

If this is not possible, does anyone have another suggestion for how to tackle this problem?

4

1 回答 1

0

正如您所提到的,应该在您编写的程序中打开文件,请尝试更改程序代码以从特定文件夹中读取文件。因此,通过从 PC 中的任何位置打开程序,您应该能够打开指定文件夹中的文件。

于 2015-03-20T10:19:55.950 回答