# Ping, FTP and other

**URL:** <https://forum.inductiveautomation.com/t/ping-ftp-and-other/483>\
**Category:** Archived Topics\
**Created:** [January 9, 2008, 12:15am UTC](https://forum.inductiveautomation.com/t/ping-ftp-and-other/483 "2008-01-09T00:15:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrtweaver](https://avatars.discourse-cdn.com/v4/letter/m/77aa72/32.png) [@mrtweaver](https://forum.inductiveautomation.com/u/mrtweaver)\
**Post date:** [January 9, 2008, 12:15am UTC](https://forum.inductiveautomation.com/t/ping-ftp-and-other/483/1 "2008-01-09T00:15:53Z")

</div>

I was wondering. I recently saw a post where there was a ping add in for PMI. Now I do not know a lot about TCP/IP, PING, and FTP. I can tell you what they mean but dont necessarily understand the underlying things that go on. So my question is can a script, similar to the ping script, be written that when a certain signal goes high it will goto a specified IP address, retrieve a .CSV file and store it somewhere, then signal that it obtained the file so it can deleted at the remote end.

It is setup to use authentication to log into the remote directory.

Hopefully this is clear. Have a great day.

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [January 9, 2008, 12:52am UTC](https://forum.inductiveautomation.com/t/ping-ftp-and-other/483/2 "2008-01-09T00:52:46Z")

</div>

If you have networking (file share) access to the files, you can probably use the functions in fpmi.file to achieve this. If you need FTP, you’ll have to use some Python FTP implementation. Possible, but I’ve never done it.

---

<div class="post-metadata">

**Author:** ![mrtweaver](https://avatars.discourse-cdn.com/v4/letter/m/77aa72/32.png) [@mrtweaver](https://forum.inductiveautomation.com/u/mrtweaver)\
**Post date:** [January 9, 2008, 1:34am UTC](https://forum.inductiveautomation.com/t/ping-ftp-and-other/483/3 "2008-01-09T01:34:11Z")

</div>

I beleive I have file share enabled. Would the be similar to FTP? I know in Internet Explorer I can type the IP address and it will take me to the folder on the PLC device. The folder is actually a compact flash card on the PLC device. It is accessable from just about anything, or so the manufaturer say. So I am going to do some research on the fpmi command you mention and see what I can come up with. If you can maybe you could provide some code that would do something so I have a starting point. Have a great day.

> [@Carl.Gould](#):
>
> If you have networking (file share) access to the files, you can probably use the functions in fpmi.file to achieve this. If you need FTP, you'll have to use some Python FTP implementation. Possible, but I've never done it.

---

<div class="post-metadata">

**Author:** ![nathan](https://avatars.discourse-cdn.com/v4/letter/n/c5a1d2/32.png) [@nathan](https://forum.inductiveautomation.com/u/nathan)\
**Post date:** [January 9, 2008, 7:25am UTC](https://forum.inductiveautomation.com/t/ping-ftp-and-other/483/4 "2008-01-09T07:25:27Z")

</div>

Windows file sharing uses netbios over TCP/IP (port 139). You get to a path with a URL (like \computer\share\_name), a username, and a password. Files can then be dealt with like local folders in Windows. FTP can feel similar, but is a different protocol. It connects with URL, username, pass, port (usually 21) and has commands to browse the file structure and get/put files. The FactoryPMI Jython builtin functions support Windows file sharing.

---

<div class="post-metadata">

**Author:** ![nathan](https://avatars.discourse-cdn.com/v4/letter/n/c5a1d2/32.png) [@nathan](https://forum.inductiveautomation.com/u/nathan)\
**Post date:** [February 17, 2008, 12:59am UTC](https://forum.inductiveautomation.com/t/ping-ftp-and-other/483/5 "2008-02-17T00:59:43Z")

</div>

As of FPMI version 3.1.5, the FTP Python Library, ftplib, is bundled with FactoryPMI. Example script to follow.
