• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 392
  • Last Modified:

automating process

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?
0
Indyrb
Asked:
Indyrb
  • 2
2 Solutions
 
junkymail1Commented:
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.
0
 
IndyrbAuthor Commented:
yes please.. any examples relating to the above would be awesome
0
 
junkymail1Commented:
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 110.110.110.110
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 110.110.110.110
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.
0
 
AlexPaceCommented:
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.
0
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

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now