Hi ramitaherwahdan1978,
You need to make use of Split method of string class.
Split method split string characters into an array based on specified delimiters.
string oldPID = "foldername1/filename1";
string[] parts = oldPID.Split('/');
string folder = parts[0];
string fileName = parts[1];