<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;}
span.EmailStyle20
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal>Bart’s suggestion is a better way as it is much more secure. Allowing FTP to be run at any time in RouterOS is asking for trouble, as it can be potentially be used for a bad actor to infect your device. SCP (Secure Copy Protocol) is not only encrypted but using Secure Shell (SSH) to access it helps prevent problems.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Stephen W9SK<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b>From:</b> PSDR <psdr-bounces@hamwan.org> <b>On Behalf Of </b>Bart Kus<br><b>Sent:</b> Wednesday, November 23, 2022 10:53 AM<br><b>To:</b> Puget Sound Data Ring <psdr@hamwan.org>; Jamie Owens <jlowens76@gmail.com><br><b>Cc:</b> Rob Martin <rgmrob@yahoo.com><br><b>Subject:</b> Re: [HamWAN PSDR] RouterOS question<o:p></o:p></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='margin-bottom:12.0pt'>Alternatively, you can push from Windows, by having an SSH key installed and using SCP:<br><br><a href="https://stackoverflow.com/questions/35292681/pscp-file-from-windows-to-linux-using-private-public-keys">https://stackoverflow.com/questions/35292681/pscp-file-from-windows-to-linux-using-private-public-keys</a><br><br>--Bart<br><br><o:p></o:p></p><div><p class=MsoNormal>On 11/23/2022 12:59 AM, Jamie Owens wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><p class=MsoNormal>Yep just use fetch with mpde=ftp and setup ftp server on windows box, problem solved<o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>On Wed, Nov 23, 2022 at 12:57 AM Tom Hayward <<a href="mailto:tom@tomh.us">tom@tomh.us</a>> wrote:<o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><div><p class=MsoNormal>Sounds like you just need /tool fetch. <o:p></o:p></p><div><p class=MsoNormal><a href="https://wiki.mikrotik.com/wiki/Manual:Tools/Fetch" target="_blank">https://wiki.mikrotik.com/wiki/Manual:Tools/Fetch</a><o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>The blacklist script is a thorough example: <a href="https://github.com/kd7lxl/blacklist-service/blob/master/block-address.rsc" target="_blank">https://github.com/kd7lxl/blacklist-service/blob/master/block-address.rsc</a><o:p></o:p></p></div></div></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>On Tue, Nov 22, 2022, 19:00 Rob Martin via PSDR <<a href="mailto:psdr@hamwan.org" target="_blank">psdr@hamwan.org</a>> wrote:<o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><div><div><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Verdana",sans-serif'>I am trying to achieve something using RouterOS scripting, and I'm hoping that here I might find the appropriate expertise.<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Verdana",sans-serif'>From a script running in a Mikrotik router I wish to pull in a copy of a file from an attached Windows computer. The computer is on the same subnet as the router.<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Verdana",sans-serif'>By way of illustration: <o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Verdana",sans-serif'> A file called test.xxx exists on a Windows computer in the folder c:\aaa\<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Verdana",sans-serif'> I want a copy of this file to appear in the attached router /file list. This copy "event" could be either a push from the computer, or a pull from the router.<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Verdana",sans-serif'>When using Winbox, this function is achieved easily using "drag and drop", but I need to automate the function.<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Verdana",sans-serif'>Thanks.<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Verdana",sans-serif'>Rob<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Verdana",sans-serif'>K7QJ<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p></div></div></div><p class=MsoNormal>_______________________________________________<br>PSDR mailing list<br><a href="mailto:PSDR@hamwan.org" target="_blank">PSDR@hamwan.org</a><br><a href="http://mail.hamwan.net/mailman/listinfo/psdr" target="_blank">http://mail.hamwan.net/mailman/listinfo/psdr</a><o:p></o:p></p></blockquote></div><p class=MsoNormal>_______________________________________________<br>PSDR mailing list<br><a href="mailto:PSDR@hamwan.org" target="_blank">PSDR@hamwan.org</a><br><a href="http://mail.hamwan.net/mailman/listinfo/psdr" target="_blank">http://mail.hamwan.net/mailman/listinfo/psdr</a><o:p></o:p></p></blockquote></div><p class=MsoNormal><br clear=all><o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><p class=MsoNormal>-- <o:p></o:p></p><div><div><p class=MsoNormal>Thanks,<o:p></o:p></p></div><div><p class=MsoNormal>Jamie Owens<o:p></o:p></p></div></div><p class=MsoNormal><br><br><o:p></o:p></p><pre>_______________________________________________<o:p></o:p></pre><pre>PSDR mailing list<o:p></o:p></pre><pre><a href="mailto:PSDR@hamwan.org">PSDR@hamwan.org</a><o:p></o:p></pre><pre><a href="http://mail.hamwan.net/mailman/listinfo/psdr">http://mail.hamwan.net/mailman/listinfo/psdr</a><o:p></o:p></pre></blockquote><p class=MsoNormal><o:p> </o:p></p></div></body></html>