<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Each Drop-off has a different claimID and passcode so if you have 10 drop-offs how can you automate the pickup if you don't have the unique claimID and passcode for each of the 10 drop-offs?</p>
<p> </p>
<p>Thanks Again for you help,</p>
<p>Sean Cole</p>
<p> </p>
<div style="color: rgb(33, 33, 33);">
<hr tabindex="-1" style="width: 98%; display: inline-block;">
<div id="divRplyFwdMsg" dir="ltr"><font color="#000000" face="Calibri, sans-serif" style="font-size: 11pt;"><b>From:</b> Jules <Jules@Zend.To><br>
<b>Sent:</b> Saturday, May 23, 2020 5:41 AM<br>
<b>To:</b> ZendTo Users<br>
<b>Cc:</b> Cole, Sean<br>
<b>Subject:</b> Re: [ZendTo] AutoPickUp</font>
<div> </div>
</div>
<div>Sean,<br>
<br>
Before using any of the scripts, you need to create a user that will be only used for driving the automation scripts of ZendTo. Don't use a real user's account, create one just for the purpose.<br>
Put that username in the 'automationUsers' setting in preferences.php.<br>
<br>
For this example, let's set a few things:<br>
- The automation user is going to have the username "<tt>robot</tt>" with a password of "<tt>machines</tt>".<br>
- The claimID and passcode of the drop-off will be "<tt>aaaClaimIDaaa</tt>" and "<tt>bbbPasscodebbb</tt>".<br>
- The address of your ZendTo site will be "<tt><a class="moz-txt-link-freetext" href="https://your-zendto-site.com/">https://your-zendto-site.com/</a></tt>". The site address always goes at the very end of the command, after all the other options.<br>
<br>
To see the command-line usage:<br>
<tt> /opt/zendto/bin/autopickup --help</tt><br>
<br>
Fetch information about the drop-off, without downloading anything:<br>
<tt> /opt/zendto/bin/autopickup --username "robot" --password "machines" --claimid "aaaClaimIDaaa" --passcode "bbbPasscodebbb" --list --nofiles
<a class="moz-txt-link-freetext" href="https://your-zendto-site.com/">https://your-zendto-site.com/</a></tt><br>
<br>
Fetch all the files in the drop-off to the current directory, verifying their checksums, and logging that they were picked up by
<a class="moz-txt-link-rfc2396E" href="mailto:user@yourdomain.com">"user@yourdomain.com"</a>:<br>
<tt> /opt/zendto/bin/autopickup --username "robot" --password "machines" --claimid "aaaClaimIDaaa" --passcode "bbbPasscodebbb" --checksum --pickedupby
<a class="moz-txt-link-rfc2396E" href="mailto:user@yourdomain.com">"user@yourdomain.com"</a></tt><tt>
<a class="moz-txt-link-freetext" href="https://your-zendto-site.com/">https://your-zendto-site.com/</a></tt><br>
<br>
Fetch all the files in the drop-off to the directory "/var/tmp/downloads", not bothering with checksums or logging who did it:<br>
<tt> /opt/zendto/bin/autopickup --username "robot" --password "machines" --claimid "aaaClaimIDaaa" --passcode "bbbPasscodebbb" --output "/var/tmp/downloads"</tt><tt>
<a class="moz-txt-link-freetext" href="https://your-zendto-site.com/">https://your-zendto-site.com/</a></tt><br>
<br>
The output of the "--list --nofiles" command above will give you a unique "fileid" number for each of the files in the drop-off. So let's download file number 123, verify its checksum and save it to the file "~/Downloads/my-picked-up-file":<br>
<tt> /opt/zendto/bin/autopickup --username "robot" --password "machines" --claimid "aaaClaimIDaaa" --passcode "bbbPasscodebbb" --file 123 --checksum --output "~/Downloads/my-picked-up-file"</tt><tt>
<a class="moz-txt-link-freetext" href="https://your-zendto-site.com/">https://your-zendto-site.com/</a></tt><br>
<br>
If you are using a locally-signed SSL certificate on your ZendTo server, you may need to add the option<br>
<tt> --insecure</tt><br>
to all of the above examples.<br>
<br>
To see the "curl" command it creates, which is what does all the work, but not actually run anything, add the option<br>
<tt> --debug</tt><br>
to any of the above examples.<br>
<br>
Does that help?<br>
<br>
The point of me using "curl" is that all the script really does is create all the parameters for an HTTP POST request to your ZendTo server, and then pull out the JSON results from the right header in the returned data. The "<tt>--debug</tt>" option will help
you understand what it's doing.<br>
<br>
Once you have played with it a bit, take a look how the script works (90% is just parsing the command-line!) and you will see how you could use a .Net http request to achieve the same result with your own code running on a Windows server.<br>
<br>
Cheers,<br>
Jules.<br>
<br>
<div class="moz-cite-prefix">On 22/05/2020 20:25, Cole, Sean via ZendTo wrote:<br>
</div>
<blockquote type="cite"><style type="text/css">
<!--
p
{margin-top:0px;
margin-bottom:0px}
-->
</style>
<p>Is anyone using the AutoPickUp Script? Any documentation on the use of the script or examples. Trying to move the files uploaded from the ZendTo server to a Windows server.<br>
</p>
<p><br>
</p>
<p>Regards,<br>
</p>
<div id="Signature">
<div style="margin: 0px; font-family: Calibri,Arial,Helvetica,sans-serif;" name="divtagdefaultwrapper">
<div class="BodyFragment"><font size="2">
<div class="PlainText">
<p class="MsoNormal"><b><span>Sean Cole</span></b></p>
<p class="MsoNormal"><span>Mgr. Network Services</span></p>
<p class="MsoNormal"><span style="color: rgb(127, 127, 127); font-size: 10pt;"></span> </p>
<p class="MsoNormal"><span><a tabindex="0" id="NoLP" href="mailto:SeanCole@sunywcc.edu"><font color="#0563c1">SeanCole@sunywcc.edu</font></a>
</span></p>
<p class="MsoNormal"><span>914-606-6923</span></p>
</div>
</font></div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre">_______________________________________________
ZendTo mailing list
<a class="moz-txt-link-abbreviated" href="mailto:ZendTo@zend.to">ZendTo@zend.to</a>
<a class="moz-txt-link-freetext" href="http://jul.es/mailman/listinfo/zendto">http://jul.es/mailman/listinfo/zendto</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">Jules
--
Julian Field MEng CEng CITP MBCS MIEEE MACM
The current UK shipping forecast:
Trafalgar: Northerly or northeasterly 5 to 7, occasionally 4 at first. Rough.
Rain or showers at first. Good, occasionally moderate at first.
<a class="moz-txt-link-abbreviated" href="http://www.Zend.To">www.Zend.To</a>
Twitter: @JulesFM
</pre>
</div>
</div>
</body>
</html>