04-05-2018 06:49 AM
Hi Wolfgang, I'm at final stage of this project. Now I need 2 help from you,
1) I need to create a file and name that file ,the name of that file should be as same as selected file from fileseletpopup instruction. I have used SplitPath and got the file name and stored it in buff how to open new writable file with same name. Please help!.
2. I need to write integer data to the new writable created, what function to use for writing the data?
04-05-2018 01:00 PM
Hi,
the answer to question 1 can be found a few posts above - OpenFile is a function to open a file for reading or writing... here for readwritemode you would specify VAL_WRITE_ONLY
For writing data you would chose another function from the Formatting and I/O Library, i.e., FmtFile ( file_handle, "%d", number ). Some examples for it can be found here
04-05-2018 05:06 PM
Hi, the problem here is, I need to open new binary output file and name that file as same as input file. I've extracted input file name from SplitPath but I'm not able to name output file same as input file.
04-05-2018 11:30 PM
Hi vinaypooja,
the problem here is that you don't spend time to read the manual (even if I provide you with the links)...![]()
1. Of course the name of the output file can be the same as of the input file - but if you open it with readonly or writeonly you cannot read and write to it at the same time. One solution is to first close the input file and then open the output file.
2. If you want to write a binary file all you have to do is to specify the respective parameter in OpenFile.
04-13-2018 10:09 PM - edited 04-13-2018 10:09 PM
i complete this work one week ago with your help, Thank you.