-
- Posts: 5
- Joined: Wed Jan 07, 2015 3:31 pm
The macro is as follows:
Author Niels Waleson
!Date 28 Oct 1997
!ChemStation G2070AA All version
!\usermacs\lc\38
!Not supported, request can be send to the author.
!This macro will copy during a sequence the files
! to a specified directory at the end of a run
!Load this file in \hpchem\core\user.mac
!Use in RunTime CheckList as PostRun command: SaveTo "E:\MYDATA"
Name SaveTo
Parameter DestDir$
!Step out if not in sequence
If _SequenceOn = 0 Then
Return
EndIf
!Create the destination directory
If FileStat(MODE, DestDir$) = -1 Then
MkDir DestDir$
EndIf
!Create the destination sequence sub directory
If FileStat(MODE, DestDir$ + "\" + _DataSeqSubDir$) = -1 Then
MkDir DestDir$ + "\" + _DataSeqSubDir$
EndIf
!If the datafile is already there write an error in the logbook
If FileStat(MODE, DestDir$ + "\" + _DataSeqSubDir$ + \
"\" + _DataFile$) = -1 Then
Copy _DataPath$ + _DataSeqSubDir$ + "\" + _DataFile$, \
DestDir$ + "\" + _DataSeqSubDir$ + "\" + _DataFile$
Else
WriteToLogBook "SaveTo error: File already exist"
WriteToLogBook DestDir$ + "\" + _DataSeqSubDir$ + "\" + _DataFile$
EndIf
Return