std::string str1 = "C:\\Users\\user\\Desktop\\Notes";
ShellExecuteA(NULL, "open", str1.c_str(), NULL, NULL, SW_SHOWNORMAL);
The code isn't worth much.
I have an .mp3
in a DJ program. In one of the tags, it holds the filename of the associated video. All the videos are .mpeg
.
With the DJ software's API, I can grab the tag. I know where the video files are (all in one folder). I can open the video with ShellExecuteA()
, because whilst the tag might not contain the full filename+extension
, I know the extension.
Now the problem - I want to start using .avi
or .h254
or whatever. I don't know the extension anymore, and ShellExecuteA()
needs an extension.
What can I do?
My guesses are:
If ShellExecuteA()
returns an error (not sure it does), if it does I could brute-force it; is it .mpeg
? Is it .avi
? Is it .h264
? etc...
Do a search in the known location with the filename missing the extension, and then grab the full filename with whatever it finds (all file names are unique, even excluding the extension).
I know I could add the extension in the .mp3
tag, but there are reasons why I'd rather not do that.
ShellExecute
does not need extension. It needs the exact file name. If extensions are hidden in Windows Explorer - make them visible. If you don't know the extension for other reason, use FindFirst
with wildcard *
(Notes*
) to find the full name.