![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello all, I'm trying to copy some files to a CD from within my application. I'm using Win XP and A2000. I've learned that it is a two-step process. First step is to copy the files to the "staging area" located at: %userprofile%\local settings\application data\microsoft\CD Burning\ The second step is the actual burning. It should be easy enough. I can complete this step manually (outside of my application) in a few ways: 1. My Computer -> Drive D -> Right-Click -> Write These Files. 2. Just inserting a new CD, will usually pop-up a balloon on the task bar prompting to write the files. 3. Ejecting the CD will usually prompt a reminder to write the files. Does anyone know a way I can write the files from within my apllication? If it can be done with a single click outside my application, I should be able to execute the task from within my application.... Thanks, Fred PS - I am NOT trying copy my open mdb file |
#3
| |||
| |||
|
|
Think this is the guts of it CDBackup: * * Set fs = CreateObject("Scripting.FileSystemObject") * * If CDBackupPath = "" Then * * * * MsgBox "There is no path set for the CD backup", vbCritical, "Insufficient Detail" * * * * Exit Function * * End If * * If Dir(DataPath) <> "" Then * * * * * * * * * * ' Make sure that the data file exists * * * * If Dir(CDBackupPath) = "" Then * * * * * * *' CD File not found * * * * * * Msg = "Can't find the " & CDBackupPath & " Fileon the CD" & Chr$(13) * * * * * * Msg = Msg & " Do you want to create this file yourself?" * * * * * * If MsgBox(Msg, vbQuestion + vbYesNo, "Missing CD File") = vbNo Then * * * * * * * * Exit Function * * * * * * Else * * * * * * * * BackupFolder = Left$(CDBackupPath, (InStrRev(CDBackupPath, "\") - 1)) * * * * * * * * fs.createfolder (BackupFolder) * * * * * * End If * * * * End If * * * * fs.Copyfile DataPath, CDBackupPath, True * *' Copy Data to AMM Services Data.Bak * * * * GoTo UpdateBackupTable * * Else * * * * MsgBox "Can't find the " & DataPath & " File", vbCritical * * * * Exit Function * * End If DataPath is the file name of the BE Database and CDBackupPath is the file name of the file on the CD HTH Phil<zuckerm... (AT) gmail (DOT) com> wrote in message news:13280bd7-c3cd-46fc-89ca-daa70ada1297 (AT) v35g2000pro (DOT) googlegroups.com... Hello all, I'm trying to copy some files to a CD from within my application. I'm using Win XP and A2000. I've learned that it is a two-step process. First step is to copy the files to the "staging area" located at: %userprofile%\local settings\application data\microsoft\CD Burning\ The second step is the actual burning. It should be easy enough. I can complete this step manually (outside of my application) in a few ways: 1. My Computer -> Drive D -> Right-Click -> Write These Files. 2. Just inserting a new CD, will usually pop-up a balloon on the task bar prompting to write the files. 3. Ejecting the CD will usually prompt a reminder to write the files. Does anyone know a way I can write the files from within my apllication? If it can be done with a single click outside my application, I should be able to execute the task from within my application.... Thanks, Fred PS - I am NOT trying copy my open mdb file- Hide quoted text - - Show quoted text - |
#4
| |||
| |||
|
|
Think this is the guts of it CDBackup: Set fs = CreateObject("Scripting.FileSystemObject") If CDBackupPath = "" Then MsgBox "There is no path set for the CD backup", vbCritical, "Insufficient Detail" Exit Function End If If Dir(DataPath) <> "" Then ' Make sure that the data file exists If Dir(CDBackupPath) = "" Then ' CD File not found Msg = "Can't find the " & CDBackupPath & " File on the CD" & Chr$(13) Msg = Msg & " Do you want to create this file yourself?" If MsgBox(Msg, vbQuestion + vbYesNo, "Missing CD File") = vbNo Then Exit Function Else BackupFolder = Left$(CDBackupPath, (InStrRev(CDBackupPath, "\") - 1)) fs.createfolder (BackupFolder) End If End If fs.Copyfile DataPath, CDBackupPath, True ' Copy Data to AMM Services Data.Bak GoTo UpdateBackupTable Else MsgBox "Can't find the " & DataPath & " File", vbCritical Exit Function End If DataPath is the file name of the BE Database and CDBackupPath is the file name of the file on the CD HTH Phil<zuckerm... (AT) gmail (DOT) com> wrote in message news:13280bd7-c3cd-46fc-89ca-daa70ada1297 (AT) v35g2000pro (DOT) googlegroups.com... Hello all, I'm trying to copy some files to a CD from within my application. I'm using Win XP and A2000. I've learned that it is a two-step process. First step is to copy the files to the "staging area" located at: %userprofile%\local settings\application data\microsoft\CD Burning\ The second step is the actual burning. It should be easy enough. I can complete this step manually (outside of my application) in a few ways: 1. My Computer -> Drive D -> Right-Click -> Write These Files. 2. Just inserting a new CD, will usually pop-up a balloon on the task bar prompting to write the files. 3. Ejecting the CD will usually prompt a reminder to write the files. Does anyone know a way I can write the files from within my apllication? If it can be done with a single click outside my application, I should be able to execute the task from within my application.... Thanks, Fred PS - I am NOT trying copy my open mdb file- Hide quoted text - - Show quoted text - |
#5
| |||
| |||
|
|
As far as I remember, the copy to needs to be a file name rather than a directory, hence the various checks that things exist, so try fs.CopyFile "C:\Photos\2a.jpg", "D:\Photos\2a.jpg" Phil |
#6
| |||
| |||
|
|
As far as I remember, the copy to needs to be a file name rather than a directory, hence the various checks that things exist, so try fs.CopyFile "C:\Photos\2a.jpg", "D:\Photos\2a.jpg" Phil |
![]() |
| Thread Tools | |
| Display Modes | |
| |