detect pdf file in folder and also check if it is open : I need codes for below. as i try to find in this website, but nothing match my need. so please if anybody write some codes.

1- it should search file in folder and file name should be taken from cell whatever file name i type for search and if it is open it should warn me that file is open."file will be in pdf format".

2- File shall not be duplicate if it find duplicate it shall show me warning REPLACE or NO.

3- if it is not duplicate than save as pdf taking whatever name i write in cells and there will 2 different cells.