CVillaleiva Posted August 2, 2018 Share Posted August 2, 2018 Hi, i have a aplication on windows 7 that generate a output file in .txt format. I need that the pmac have acces to this file to read and load global variables with the information. I try put file using the ftp (ftp://192.168.200.1) but i dont have succes. i create a C aplication into pmac using libraries #include #include #include but i have dude with the path to acces a file. if you can give me a example how to put the path and where is the best place to put the file. thanks. int main(void) { FILE * fp; char * line = NULL; int len = 0; int read; struct Data data; { }; fp = fopen("test.txt", "r"); if (fp != NULL){ while ((read = getline(&line, &len, fp)) != -1) { data = getValue(line, read); } fclose(fp); if (line) free(line); } printStructure(&data); return 0; } Link to comment Share on other sites More sharing options...
shansen Posted August 2, 2018 Share Posted August 2, 2018 If you place the file in the ftp top level directory it should be located in /var/ftp. So pass the full file path to fopen: fp = fopen("/var/ftp/test.txt", "r"); Link to comment Share on other sites More sharing options...
CVillaleiva Posted August 13, 2018 Author Share Posted August 13, 2018 If you place the file in the ftp top level directory it should be located in /var/ftp. So pass the full file path to fopen: fp = fopen("/var/ftp/test.txt", "r"); thanks for your answer. I try but when i put the file into the ftp folder the system throw the attached problems. how can i enable and wich is the best folder to put the file? thanks again Link to comment Share on other sites More sharing options...
Omron Forums Support Posted August 17, 2018 Share Posted August 17, 2018 I am able to drag a text file into gather or usrflash no problem on multiple PMAC CPU types through ftp in a file explorer like your computer shows. What PMAC form factor is this and can you share the file or try with a dummy text file with just a sentence written? Link to comment Share on other sites More sharing options...
CVillaleiva Posted August 20, 2018 Author Share Posted August 20, 2018 I am able to drag a text file into gather or usrflash no problem on multiple PMAC CPU types through ftp in a file explorer like your computer shows. What PMAC form factor is this and can you share the file or try with a dummy text file with just a sentence written? the Pmac is POWER PMAC CLIPsee P233I-E-01 [4-4050JA0-310-000000] and the text file (.txt) that i tried put was: start=1; stop=0; Link to comment Share on other sites More sharing options...
Omron Forums Support Posted August 21, 2018 Share Posted August 21, 2018 I am not able to replicate your problem. Please try using an FTP client like filezilla as windows file explorer as FTP can have some issues. There is a windows option you can try to see if it helps. Find "internet options" in either the control panel or searching the start menu. Go to the advanced tab and scroll down to "Use passive FTP (for..." and check/uncheck the box. If it doesn't help, just set it back. Link to comment Share on other sites More sharing options...
Recommended Posts