Stuck in Windows (have only tested it on an XP Virtual machine) and need to do development work, but constantly have to associate files (.php, .pl, .htaccess, .css, …) as Windows doesn’t support them by default?
Write a script on your webserver to get a list of all the extensions being used and write a bash script in Windows to associate them all with whichever program you need it associated with (Post a comment if you need help).
How do you associate files via command line?
Type: assoc <.extension>=<filetype>
Let’s say you need to add new types or want to change the program being used to open txtfiles or phpfiles or whatever filetype you want to reassign to a different program.
In Windows Explorer go to Tools -> Folder Options -> File Types
Here you can reassociate the txtfile or any other file type with whatever program you want and add other file types.
Hope this saves a couple of Windows victims a bit of time ;-)



Very cool, never to learn new tricks ;-)
“TOO OLD”
Haha, now that makes more sense :p
It seems Windows has an undiscovered world of scripting capabilities that just never gets any attention; although it’s far from being as powerful as Linux, at least there’s something to use when needing to automate tasks :-)
Hehe, it’s not a BASH script you linux addict ;)
Powershell should go a long way towards proper scripts in windows environments, but even the humble little command line can get a lot of work done.
You just gotta learn the words!
Woops, I probably meant batch script or what do you call those things again :p
That’s a great tip Pyro, never even knew about PowerShell, just had a quick look on Wikipedia and it does look very handy: http://en.wikipedia.org/wiki/Windows_PowerShell