Copying MP3 Files to a USB Drive (1 Viewer)

Status
Not open for further replies.

Steve R.

Retired
Local time
Today, 09:27
Joined
Jul 5, 2006
Messages
4,684
Attached is an Access database that can copy MP3 files from the C: drive or another drive to a USB device. The USB device can be used as the playlist source for playing songs on car radios equipped with a USB port. The reason for developing this program was to generate a random list of songs. No manual organization required.:)

USB drives can hold a lot more songs that an individual CD. Individual CDs are also subject to damage and getting misplaced. This program minimizes those shortcomings.

I updated the forms to give them a cleaner look. I also fixed a bug that made itself know when the music was on an internal drive other than the C: drive.

In studying this database, please be aware that there are numerous pieces of sample code developed by others. The majority of code for this project was obtained by researching this forum.

"Lessons" contained in this database include:
1.How to write and read an MS-DOS text file.
2. How to use "ShellWait"
3. How to use the random function.
4. How to empty (zero out) a table.
5. How to create a DAO table if it does not currently exist.
6. How to select a source and destination directory.
7. How to test a drive for available space.
8. How to obtain the path name to a file.
9. How to isolate the file name from the path.
10. Now to copy a filed from one location to another.
 

Attachments

  • MP3_SongCopy.accdb
    500 KB · Views: 779
Last edited:

DCrake

Remembered
Local time
Today, 14:27
Joined
Jun 8, 2005
Messages
8,632
My only criticism of this app it the naming conventions of controls on the main form. Using Text2,Text3, Text4, Etc does not lend it self to readability. Other than that comments cleared displayed in code. Main form could have looked a little more professional. Not tested but very good submision.
 

Steve R.

Retired
Local time
Today, 09:27
Joined
Jul 5, 2006
Messages
4,684
One of the shortcomings in my database is the use of the MS-DOS DIR command and creating a temporary file that has to be deleted. A more elegant solution would be to dump the file names directly into an array. This topic was recently discussed here.

Unfortunately what would appear to be the appropriate solution, the use of "Application.Filesearch" turns out not to be available for Access 2007. I had wasted a lot of time on this, but in re-researching it; Bodisathva reported that "Since the Application.FileSearch method is depreciated or hidden for 2007, try the File System Object's FileExists method. This could actually accomplish the same thing in just a few more lines of code if you do it recursively.".

Also the use of the Access DIR function appears to be less than optimal. Here is the Microsoft website write-up on the DIR function. Access help itself was not as informative.

Thanks for your comments DCrake. For now, the program works. As time permits, it may be tweaked with improvements.
 
Status
Not open for further replies.

Users who are viewing this thread

Top Bottom