folder path name

  1. I need to get the name of the folder a file is in
  2. I can create a folder but I need to paste the name of the folder from 1 above to the new folder I am able to create.

the second folder in on another drive but it needs to have the same name as the source folder for identification purposes.
thanks for any help.