-
I've got some code that I need to modify, but since I'm not very proficient in VB, I was hoping someone might be able to help me. The program writes a text file out from data in an imaging software. What I need to change is where that file is written to. There is a specific directory I want it to go. I've have the code to show someone if they'd care to view it. I can email it to you. Please respond by email if you can help. I would greatly appreciate it. Thanks. My email is [email protected]
eddie
-
Wouldn't it be easier to grab the file after its written and move it?
That way you wouldn't have to mess with the code.
You would write a "wrap-around" program, which would invoke the original, wait for it to finish, and then simply copy the file.
Good Luck
DerFarm
-
writing file
Hi Derfarm. So it might be better just to let the file write out normally and then just move it to the desired directory? I guess that sounds better. Your the expert, not me. Like I stated in my first message, I am new to VB. Could you give me an example of some sorts of how to move and also copy a file to another directory. Thanks.
playmaker
-
Usually, the easiest way to modify a runing program is to add a subroutine that is called after everything else is run....ie just before the program exit. This way you don't have to mess with anything that happens above, and if the damn thing breaks then you know it was YOU that screwed up.
In this case the subroutine would be passed the current name and location of the generated file and the proposed new name and location. It would then copy the file over and exit....leaving the original program intact.
Good Luck
DerFarm