In a recent Ipswitch IT Priorities survey of over 371 IT professionals involved in file transfer and sharing administration, about 75% said they already used or had need for file transfer automation. Their most common scenarios were:
- Automate batch scheduling
- Workload automation
- Integration to backend systems. They include financial, CRM, ERP, cloud storage, ECM, EMR or marketing automation systems.
About half said they use Powershell to upload/download data from applications and databases today. So what should you keep in mind when using Powershell to automate common file transfer activities?
- Use Windows Managament Instrumentation (WMI) to monitor a folder for newly arriving files.
- Use Get/Add-Content calls when making changes to a file
- Automation of file encryption is tricky, but consider using GnuPG. Ensure you don't use cleartext passwords.
- You can use WinSCP client or WS_FTP Professional to transfer the files using secure protocols like SFTP, FTPS or HTTPS.
Managed file transfer automation tools, like MOVEit Central, can make automating common tasks related to file transfers in much less time. They are built to handle commonly overlooked scripting issues. These include error handling, logging, environment changes, and security related issues like encryption key management and password protection.
Adam Bertram, Microsft MVP, shared some "how-to’s” and sample code to automate a common file transfer scenario at last week’s Spiceworks webinar "Automating File Transfers Securely"
- Monitor a folder for arriving files
- Make changes to a file
- Encrypt the file
- Transfer the file
You can access the sample code at Adam’s blog here.