Is there any way of running a powershell script by drag-n-dropping a file on it (just like you would drag-n-drop a file on a .exe file)? It would be also nice to be able to do the same thing with folders...
Create a Windows Explorer shortcut (In Explorer right click -> new -> shortcut). Then right-click on your shortcut and open the Properties dialog box. In the Target field enter something like this:
Whether you need the
Now when you drop a file (or folder) onto this shortcut, explorer will magically pass it as the first argument to your script.