| | |
Working with mp3 files and folders.
Please support our C++ advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Nov 2008
Posts: 1
Reputation:
Solved Threads: 0
Hi,
Recently I came up with an idea of making my own program for tagging mp3 files. I realised I'm lacking in knowledge. For now I need the following information:
1. After typing a path to a main folder, I'd like to read the names of the folders inside.
2. Than I want to visit each of those folders - get inside (Those folders will include mp3 files).
3. Finally I want to enter this section of a mp3 file where the information about e.g. atrist or genre is kept and I want to chane it.
Can anyone help tell me with this?
Thanx!
Recently I came up with an idea of making my own program for tagging mp3 files. I realised I'm lacking in knowledge. For now I need the following information:
1. After typing a path to a main folder, I'd like to read the names of the folders inside.
2. Than I want to visit each of those folders - get inside (Those folders will include mp3 files).
3. Finally I want to enter this section of a mp3 file where the information about e.g. atrist or genre is kept and I want to chane it.
Can anyone help tell me with this?
Thanx!
•
•
Join Date: Nov 2008
Posts: 15
Reputation:
Solved Threads: 0
the first 2 questions can be solved by the following sample code:
the information on artist in a mp3 file is stored in the last 128 bytes of the file. so you can simply read the last 128 bytes.
C++ Syntax (Toggle Plain Text)
find(char * lpPath) { char szFind[MAX_PATH]; WIN32_FIND_DATA FindFileData; strcpy(szFind,lpPath); strcat(szFind,"\\*.*"); HANDLE hFind=::FindFirstFile(szFind,&FindFileData); if(INVALID_HANDLE_VALUE == hFind) return; while(TRUE) { if(FindFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { if(FindFileData.cFileName[0]!='.') { strcpy(szFile,lpPath); strcat(szFile,"\\"); strcat(szFile,FindFileData.cFileName); find(szFile); } } else { cout << FindFileData.cFileName; } if(!FindNextFile(hFind,&FindFileData)) break; } FindClose(hFind); }
![]() |
Similar Threads
- Surf Sidekick has taken over my computer (Viruses, Spyware and other Nasties)
Other Threads in the C++ Forum
- Previous Thread: Help me to finish program. Urgently!
- Next Thread: Generate 6 Random Numbers
Views: 323 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for C++
6 api application array arrays based beginner binary c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete deploy developer display dll dynamiccharacterarray email encryption error file format forms fstream function functions game generator givemetehcodez graph homeworkhelp iamthwee ifstream image input int java lib list loop looping loops map math matrix memory multiple newbie news number numbertoword output pointer problem program programming project python random read recursion recursive reference return rpg search sort sorting string strings struct template templates text tree url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets





