hi,
we have one document library (Upload Documents) in that document library we have Archive Folder , when upload document to upload document library first we want check same document name is there or not and check version also ,if the same document is there in that document library then move to that document to Archive folder with same version and add to document to upload document library..
ex:
Document Lib name:---Upload document
folder name-->Archive Folder
Document: Test.txt and version is 1.0
when upload same document to document library the Test.txt file move to archive folder and add same document in upload document library with new version