David Preston

Musings of an old bloke.



Filetype Associations in FileZilla Portable

This is one of those posts that is more of an aide-mémoire for me than anything else, although I will be pleased if it helps anyone else.

The background was that I was going to write another blog post (not this one), but before then I wanted to change the width of the .container div and make it a bit wider. But I couldn't remember my own ftp login (embarrassing). So, Pro Tip 1, hi thee along to portableapps.com and set up a USB thumb drive with a few useful apps, including FileZilla Portable, Notepad++ Portable and IrfanView Portable. There are loads of others as well, but these three form the crux of this story.

"But why" I hear you ask, "portable versions?". Good question. Plenty of reasons, not least being guaranteed availability of programs you need and are familiar with, plus you (I) can save your (my) ftp password in my portable FileZilla and never need to remember it. TBH I don't even know it; I reset it on my hosting control panel using LastPass in Chrome, but that doesn't work in desktop programs (so far as I know) and just copy/pasted it into FZ.

Right, so that's that sorted. Now to edit my site's CSS. Open the hosting in FZ, right-click main.css and click View/Edit. And Aptana Studio opens up (in its own good time) from my hard drive. Well, that's a bit rubbish. Nothing against Aptana per se, but I stopped actually using it ages ago. Atom is my current development editor of choice, with Notepad++ for quick edits to almost anything. So in my desktop instance of FZ at work I have NP++ set as default editor for everything, and it would be nice to have FZ Portable use other portable apps on the thumb drive to open files for editing.

After Googling around a bit, I found this Superuser answer for a different portable platform, which gave me enough help to solve my problem. What I ended up with was in FZ Portable, go to 'Settings - File editing - Filetype associations' and enter these lines -

php "..\Notepad++Portable\Notepad++Portable.exe"
css "..\Notepad++Portable\Notepad++Portable.exe"
js "..\Notepad++Portable\Notepad++Portable.exe"
. "..\Notepad++Portable\Notepad++Portable.exe"
inc "..\Notepad++Portable\Notepad++Portable.exe"
txt "..\Notepad++Portable\Notepad++Portable.exe"
md "..\Notepad++Portable\Notepad++Portable.exe"
ico "..\IrfanViewPortable\IrfanViewPortable.exe"
jpg "..\IrfanViewPortable\IrfanViewPortable.exe"
png "..\IrfanViewPortable\IrfanViewPortable.exe"
webp "..\IrfanViewPortable\IrfanViewPortable.exe"
gif "..\IrfanViewPortable\IrfanViewPortable.exe"

Line 4 was interesting. I originally had htaccess and gitignore as file types, but that didn't work as FZ sees them as '.' files. Anyhow, all those file types now open in their respective portable colleagues.

Categories:Web Development

Tags:FileZilla, PortableApps, IrfanView, Notepad++