split in to seperate scripts for file/folder, will merge once bugs are worked out