Open a file type with a program AS another file type (Windows 10)

0

For a project I'm working on I need to keep Photoshop files (.psd) in the same directory as another program (Unity3D) imports from. In order to get Unity not to see the Photoshop files I can change the extension to .psd~ causing Unity to overlook their presence.

The problem then is even if I associate the .psd~ files with Photoshop it has no clue what to do when I open them, is there anyway to keep the file type .psd~ yet make get Photoshop to open them as if they were just .psd files? Thanks!

Fraser

Posted 2019-03-22T17:48:33.700

Reputation: 101

1So, you want to hide the files Unity3D needs from Unity, and still open them in Photoshop? What if you rename them to .psda? While the extension is something of a first sign of what program(s) should open a file, most applications look at things INSIDE the file to see what they actually are and how to handle them. It may just be the tilde causing this problem, not the fact that you're adding a character to the filename. – music2myear – 2019-03-22T18:01:15.847

The problem isn't the .psd file type in particular, more that I don't want unity dealing with any photoshop files overall. I know normally programs look at the content of a file rather then it's extension to figure out how to open them but in this case adobe seems to have taken more naive route to determining the file's format. – Fraser – 2019-03-22T20:03:51.883

1Why do you need the files to be in the same place? Have you tried using something besides the tilde (~) as the addend to the psd extension? Is there a way to tell Unity to leave the files alone? – music2myear – 2019-03-22T20:19:25.097

Having the files in the same place is just extremely useful for my workflow, but I'll concede it's not entirely necessary. As far as I can tell the only way to make Unity ignore the files is to either end them with a tilde or put a dot before their names (but that won't work as an entirely separate bit of software I won't get into now needs them to not be hidden). There is a way of excluding files from unity collaborate with a .gitignore style solution but as far as I can tell there's no way to do it solo. – Fraser – 2019-03-23T19:32:43.277

You still haven't answered whether you've tried using something other than a tilde. We're not just diagnosing Unity issues, we're also trying to figure out what Photoshop's hangup is, and to do that we need to know whether the tilde breaks PS' recognition of the file. This doesn't mean you HAVE to use something besides tilde, it DOES mean that if you want to get us the information necessary to possibly get you a solution, or to be able to give you a good solid and informed answer, we NEED you to give us that very small and simple piece of information. – music2myear – 2019-03-25T15:29:00.743

I really don't see the relevance but no, Photoshop won't open psd documents renamed to .whateverotherfakeextentionyoucandreamof. What I'm ideally looking for is some way to, when opening a .psd~ file, copy it to a temporary .psd file, open that, then copy it back whenever it's changed. The first steps are trivial with a simple script but I've not got a clue on how to automate the copy back on save process. Hence this question here checking if there's some completely different method I've never even considered. – Fraser – 2019-03-25T20:05:38.387

Have you considered putting the psd files in a subdirectory? – cybernetic.nomad – 2019-03-26T11:08:51.033

Unfortunately Unity scans all subdirectories. – Fraser – 2019-03-26T22:15:34.917

No answers