automating process

Posted on 2011-09-29
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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 250 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 ""
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 250 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:

Here is one that watches a local folder and uploads new files:

Here is one that downloads a file and automatically decrypts it:

Here is a page that talks about writing a Robo-FTP script to be used as a windows service:

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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
In this post we will be converting StringData saved within a text file into a hash table. This can be further used in a PowerShell script for replacing settings that are dynamic in nature from environment to environment.
This tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…

707 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