Working string crop function
remove unwanted files