automating process

Posted on 2011-09-29
Medium Priority
Last Modified: 2012-05-12
Company 1 exchanges files bi-directionally with Company 2.
Company 2 wants help automating the process in a Windows Environment.  Here’s the process:

                Company 1's files get encrypted using GPG
                Encrypted files are automatically sent to Company 1's FTP using Company 2’s key
                Company 2 manually grabs the files
                Company 2 manually unencrypts files
                Company 2 manually modifies the files
                Company 2 manually re-encrypts the files using Company 1’s key
                Company 2 manually sends back to FTP for Company 1 to use

Is there a way to automate this process?
Question by:Indyrb
  • 2

Expert Comment

ID: 36814836
Have you looked at the Microsoft Task Scheduler?  You can run programs, and perform multiple steps at specific times.  You can also create batch files to perform other tasks and be called by the Task Scheduler.  The program is part of the OS and has become very robust on what you can do.  I can give you some examples if you would like.

Author Comment

ID: 36814877
yes please.. any examples relating to the above would be awesome

Accepted Solution

junkymail1 earned 1000 total points
ID: 36815161
You can do it with a batch files.

Batch 1 --- Encrypt and Put the files on an ftp site
REM Encrypt file
gpg -c Myfile
@echo off
(echo open
echo user username
echo password
echo cd /destination/path
echo bin
echo put "C:\Users\Public\Location\Myfile"
echo quit
) | ftp -n -i

Batch 2 --- Get Files
@echo off
(echo open
echo user username
echo password
echo cd /destination/path
echo bin
echo get "FILE.MDBv1.zip"
echo quit
) | ftp -n -i

REM Decrypt File
gpg file.gpg

You can use a combination of those 2 files to create send and retrieve batch files that can be called by windows scheduler.
LVL 16

Assisted Solution

AlexPace earned 1000 total points
ID: 36816159
You could use Robo-FTP scripts installed as a Windows Service so they are always running, even if the machine reboots.  You could do it all as a single script or, as junkymail1 suggested, as a pair where one does uploads and the other does downloads.  The Service would constantly monitor the remote server for new files and download them as soon as they appear on the FTP site.  It would then decrypt them and maybe even send a notification email to someone with a link to the new file on your network... I guess you could even send the decrypted file as an attachment in the email so that would be pretty seemless because receiving an email would be something the company 2 users would be familiar with already.  The outgoing server would watch a folder on the company 2 network and, as any file arrived, encrypt it and then upload it to the company 1 FTP site.  This is more complicated than email but still very automated... the company 2 person just has to know how to copy a file into a folder after they do the processing.  Robo-FTP can also do some basic reading and writing of text files so, depending on the type of modification needed, you might be able to automate that part as well.  

Here is an example script that watchs a remote folder and downloads files as they appear: http://www.robo-ftp.com/help/3.7/the_hot_receive_feature.htm

Here is one that watches a local folder and uploads new files: http://www.robo-ftp.com/help/3.7/the_hot_send_feature.htm

Here is one that downloads a file and automatically decrypts it: http://kb.robo-ftp.com/script_library/show/7

Here is a page that talks about writing a Robo-FTP script to be used as a windows service: http://www.robo-ftp.com/help/3.7/service_scripts.htm

That should be enough to get you started.  Robo-FTP is really good at this sort of thing.  I think the scripting language was easy to learn but i have a lot of software development experience.  I imagine if you've never learned to program it would be a challenge.

Featured Post

Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
Transferring FSMO roles is done when an admin wants to split roles between certain Domain Controllers or the Domain Controller holding the Roles has been forcefully demoted using dcpromo / forceremoval
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

597 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question