Quite true that swords are obsolete. However in the 20th century there were cases when archiac forms of weapons were used, despite the availability of rifles.
WW-1 trench warfare would be a predominant example-for trench raids entrenchment tools were used and modified, cudgels, trench knifes (some ...