OK, just got home and tried something on my XP Home computer which is
connected to a peer to peer network. I did find out that the batch file
will wait until the Windows program ends before running the next line (I
tried it with Word and a backup batch file I had already created)
..
Start Notepad
Create a batch file with the original Windows program's path and executable
on the first line
The copy or xcopy command on the second and subsequent lines to copy the
files needed to copy.
On the last line type EXIT. (while not really necessary it ensures that
the command window closes)
Save the batch file as the program's name with a bat extension to the
desktop. You may have to tweak the properties of the command window to
ensure the program opens the way you want it to.
The example I tried is:
"C:\Program Files\Microsoft Office\Office\WINWORD.EXE"
"C:\Backup daily.bat"
EXIT
The quote marks need to be around the paths if there are any spaces in the
program name.
The contents of the daily.bat file referenced in the above example is:
(used to make daily backup of a few files changed each day)
@ECHO OFF
XCOPY "C:\DOCUMENTS AND SETTINGS\MYNAME\FAVORITES\*.*" V:\FAVORITES /E /I
/G /H /R /C /Y /D:4-10-05
XCOPY "C:\DOCUMENTS AND SETTINGS\MYNAME\DESKTOP\*.* V:\DESKTOP /E /I /G /H
/R /C /Y /D:4-10-05
XCOPY C:\DOWNLOAD\*.* U:\DOWNLOAD /E /I /G /H /R /C /Y /D:4-10-05
XCOPY D:\GRAPHICS\*.* U:\GRAPHICS /E /I /G /H /R /C /Y /D:4-10-05
XCOPY "D:\SONY PICTURES DOWNLOAD\*.*" U:\GRAPHICS /E /I /G /H /R /C /Y
/D:4-10-05
EXIT
Don J said:
The program is Windows based. The files are not created by the
program, only modified by it. Presumably the only things that change from
the outside is the time and date. Is there anyway of using the time/date
as the trigger?
The program is intended to be called by the user, so Windows can be
immediately exited after the program is exited. I am using Windows XP
Home. Apparently XP Professional has ways of performing the transfer at
the time of exiting Windows. Do you know if XP Home can perform the
transfer as a result of Windows closing?