文献:record some information that deserve to be researched. This word isn't normally used in computer science.
文件:file.
文件夹:folder.
文档:folder, which comes from the system(in windows, there is a folder named "Documents", this folder is created by the system, it is called 文档. Another folder named "Images", this can be called 文档 too.) OR some file special (in windows, they are WORD, EXCEL, txt file etc, these files are used to record some infomation which is allowed being read by user)
by the way, in Taiwan, these names are different.