I have a program that gets a filename from the user and then opens that file and saves the whole path(including the name of the file.) as a string into a variable.
I want to extract JUST the path from the string and use that to make the program save the new file in the same directory. How do I do this? (referring to the extraction, not the saving)
Comments
Leave a comment