I have an app (a Perl script that I wrote) that writes files to a DVD/RW disk on a recurring (daily) basis. The idea is that the data is collected and a new file is burned each day. On my old computer (a desktop system) I had to use an eject and then a load command to "refresh" Windows' directory data for the disk and see the latest directory content. Without the eject/load cycle (where the disk tray is pushed out and then drawn back in) the prior directory of the disk (when first inserted) continues to display after the burn. That worked fine, but now I have a new laptop with the "pop out" DVD drive, and it can't draw the disk back in after ejecting it without manual assistance. Since the objective is to have unattended collection for several days, the need for a manual assist to push the disk back in doesn't work.
So, my question is whether there is some command (or sequence of commands) that can perform the same effect as ejecting the disk and loading it again, so that I can see the latest files on the disk and know what files are there and how much space is left on the disk? I would expect that there should be some way to accomplish this, but after much research I don't seem to come up with any clue. I gather that there is data cached in Windows somewhere about the directory information, and it doesn't get updated without the physical "replacement" of the disk. So perhaps there is a Windows function that I need to kick to get it to reread the disk without physically moving the tray?
I've tried the -reset option, but apparently that is just a reset to the "SCSI bus". It doesn't change anything about the directory listing.
In case it matters, I'm using cygwin and its wodim disk burning application. I burn the new file to the disk. The burn is successful, but if I do a DIR on the drive it reports the previous file list/sizes. If I manually eject the DVD and insert it again, then the newly burned file shows up. If I needed to write some little app that could tickle Windows into re-reading the disk's data, and call that at the appropriate time from my Perl script, that would be a fine solution. A friend suggested that perhaps uninstalling/reinstalling the drive might accomplish it, but that seems like an extreme way to attack what seems like should be a common problem with an "obvious" (?) solution.
Thanks,
--
Greg
So, my question is whether there is some command (or sequence of commands) that can perform the same effect as ejecting the disk and loading it again, so that I can see the latest files on the disk and know what files are there and how much space is left on the disk? I would expect that there should be some way to accomplish this, but after much research I don't seem to come up with any clue. I gather that there is data cached in Windows somewhere about the directory information, and it doesn't get updated without the physical "replacement" of the disk. So perhaps there is a Windows function that I need to kick to get it to reread the disk without physically moving the tray?
I've tried the -reset option, but apparently that is just a reset to the "SCSI bus". It doesn't change anything about the directory listing.
In case it matters, I'm using cygwin and its wodim disk burning application. I burn the new file to the disk. The burn is successful, but if I do a DIR on the drive it reports the previous file list/sizes. If I manually eject the DVD and insert it again, then the newly burned file shows up. If I needed to write some little app that could tickle Windows into re-reading the disk's data, and call that at the appropriate time from my Perl script, that would be a fine solution. A friend suggested that perhaps uninstalling/reinstalling the drive might accomplish it, but that seems like an extreme way to attack what seems like should be a common problem with an "obvious" (?) solution.
Thanks,
--
Greg