Hello,
Here's what I'm up to today!
I'm trying to copy the contents of multiple PXP Files (recordbased inhouse format) that all reside in a directory that is being watched by a filesystemwatcher. Once the .created or .changed event is triggered this fuction will open each file, copy its contents line by line to a 'daily PXP file' that has a timestap in its filename, and then the orginal file will be moved into an 'original' directory to hold the orignal PXP files just in case! Here's what I have so far and the psuedo code is what I believe I need. If its not, Please feel free to change things around..Thanks!!
<code>
Public Function StripAppend(ByVal infile as String)
dim strm as filestream = File.Create(watchfolder.path & Date.Today & ".PXP")
strm.Close()
File.Open(1, watchfolder.Path.ToString & Date.Today & ".pxp", FileMode.append) ' this is the Daily file that will hold the contents of the multhat will be created if it doesn't exsist
For Each PXPinDirectory
File.Open(write content of eachpxpfile, to 1)
Move each file to (watchfole.path & "Original\&)
File.close
Next
<code>
well.as you can see...I need some help. Is my logic right? Syntax (obviously the syntax isn't)
Thanks in advance!!! yeah!!! Thank you!
croag !!
Here's what I'm up to today!
I'm trying to copy the contents of multiple PXP Files (recordbased inhouse format) that all reside in a directory that is being watched by a filesystemwatcher. Once the .created or .changed event is triggered this fuction will open each file, copy its contents line by line to a 'daily PXP file' that has a timestap in its filename, and then the orginal file will be moved into an 'original' directory to hold the orignal PXP files just in case! Here's what I have so far and the psuedo code is what I believe I need. If its not, Please feel free to change things around..Thanks!!
<code>
Public Function StripAppend(ByVal infile as String)
dim strm as filestream = File.Create(watchfolder.path & Date.Today & ".PXP")
strm.Close()
File.Open(1, watchfolder.Path.ToString & Date.Today & ".pxp", FileMode.append) ' this is the Daily file that will hold the contents of the multhat will be created if it doesn't exsist
For Each PXPinDirectory
File.Open(write content of eachpxpfile, to 1)
Move each file to (watchfole.path & "Original\&)
File.close
Next
<code>
well.as you can see...I need some help. Is my logic right? Syntax (obviously the syntax isn't)
Thanks in advance!!! yeah!!! Thank you!
croag !!