So I have a FileDialogue Object in Tkinter that gets the location of a file from the User's Computer.
The output is not always the same as the directory may vary.
For E.G. = Filename = C:/MusicDirectory/Music.mp3
, or it can be something else too, like D:/Some/Directory/IDontKnowWhatToTypeAnyMore/Music.mp3
My main objective is to remove the "C:/MusicDirectory/
" and the unwanted Directory from the string, but the string does not remain the same. It can be some other folder too.
Can someone help me in this situation?