Hi all,
I'm having trouble copying my capture file to a shared directory. Any assistance would be very appreciated.
This script creates a capture file "temp.txt". At 1:00am, the capture file is renamed to a time/datestamp. Next, it is supposed to copy the new file to a shared directory. At 1:01am, I re-start the capture file.
The script compiles and runs just fine, but never copies the file. Here is the code (some of this will look familiar, I've snatched bits and pieces from other threads in this forum):
proc main
string sCapPath, sCapFile, sCapFile2, sNewFile, sCmdLine
integer iYear, iMonth, iDay, iHour, iMin, iSec, iCount
set capture file "temp.txt"
fetch capture path sCapPath
ltimeints $LTIME iYear iMonth iDay iHour iMin iSec
capture on
iCount = 0
while 1
yield
while 1
yield
ltimeints $LTIME iYear iMonth iDay iHour iMin iSec
if iHour == 1
if iMin == 00
if iCount == 0
capture off
ltimeints $LTIME iYear iMonth iDay iHour iMin iSec
strfmt sNewFile "%02d%02d%02d" iMonth iDay iYear
strcat sNewFile ".TXT"
strfmt sCapFile "%s\temp.txt" sCapPath
strfmt sCapFile2 "%s\%s" sCapPath sNewFile
shortpath sCapFile sCapFile
rename sCapFile sCapFile2
strfmt sCmdLine "copy /y %s F:\Users\phone\capture.txt" sCapFile2
dos sCmdLine MINIMIZED
iCount = 1
endif
endif
if iMin == 01
capture on
iCount = 0
endif
endif
endwhile
endwhile
endproc
I'm having trouble copying my capture file to a shared directory. Any assistance would be very appreciated.
This script creates a capture file "temp.txt". At 1:00am, the capture file is renamed to a time/datestamp. Next, it is supposed to copy the new file to a shared directory. At 1:01am, I re-start the capture file.
The script compiles and runs just fine, but never copies the file. Here is the code (some of this will look familiar, I've snatched bits and pieces from other threads in this forum):
proc main
string sCapPath, sCapFile, sCapFile2, sNewFile, sCmdLine
integer iYear, iMonth, iDay, iHour, iMin, iSec, iCount
set capture file "temp.txt"
fetch capture path sCapPath
ltimeints $LTIME iYear iMonth iDay iHour iMin iSec
capture on
iCount = 0
while 1
yield
while 1
yield
ltimeints $LTIME iYear iMonth iDay iHour iMin iSec
if iHour == 1
if iMin == 00
if iCount == 0
capture off
ltimeints $LTIME iYear iMonth iDay iHour iMin iSec
strfmt sNewFile "%02d%02d%02d" iMonth iDay iYear
strcat sNewFile ".TXT"
strfmt sCapFile "%s\temp.txt" sCapPath
strfmt sCapFile2 "%s\%s" sCapPath sNewFile
shortpath sCapFile sCapFile
rename sCapFile sCapFile2
strfmt sCmdLine "copy /y %s F:\Users\phone\capture.txt" sCapFile2
dos sCmdLine MINIMIZED
iCount = 1
endif
endif
if iMin == 01
capture on
iCount = 0
endif
endif
endwhile
endwhile
endproc