Laws relating to doors, windows and locks on Shabbos (Part 2 - abridged)MBY 313:1-5 [Based heavily upon Kitzur Shulchan Aruch: 80:67-72, “Metsudah” edition, with notes, translated and annotated by Rabbi Avrohom Davis]
70) A door-like plank made of one piece may not be used to close a doorway that is not used for regular entrance and exit - even if the plank has a pivot/hinge like a door, but is currently not swinging on it. The fact that it is made of a single plank and does not open and close like a door, but is free-standing, makes it appear like building and permanently closing up an open space. If the opening is used as a regular entrance and exit, we may be lenient and close the doorway with this free-standing door, provided that the doorway has a “doorsill”, whereby it is obvious that it is a doorway. (Footnote #185: If the door is made of more than one plank, it is permitted to be opened and closed even if there is no doorsill.)
71) A plank-like window shutter (or other board) may be used to shut the window even if it is not attached to the building, provided that it has already been used at least once before Shabbos to close the window, or one had in mind before Shabbos to shut the window with it. However, if this plank had never before been used, and one did not have in mind before Shabbos to use it, it is forbidden to be used to shut the window. An object that is not customarily left in the window long-term, e.g. a garment, is permitted to be used for window-shutting under all circumstances.
72) Door and windows which hang on hinges - even if they are easily removed and reset – are forbidden to be removed or hung on Shabbos. One who hangs them is in violation of the melacha of ‘boneh’ (building), and one who removes them is in violation of the melacha of ‘sosair’ (demolishing). (Ed: Of course, they may be opened and closed on their hinges!)