I need a task schedule on windows server that will automatically download a given file from an ftp server, using a shell-command line then decrypt this same file and save the file into a folder and if task finds no "new" file on ftp server – operation should be aborted.
Can anyone please help me out with the script ?
Thanks in advance
by Klaas at 2013-01-14 00:11:18
Can you post the parts of the script you have written and tell us what works and what not? What errors do you get?
by hitzzz at 2013-01-14 00:19:40
Below are 2 different url in which script is provided, I want to use any one of them.
Thank you for providing the link, but I am totally noob in this and could not understand as there were so many files. I just need one file to process.
by nohandle at 2013-01-14 04:55:11
[quote="hitzzz"]Thank you for providing the link, but I am totally noob in this and could not understand as there were so many files. I just need one file to process.[/quote] Hi, download the module and extract it somewhere to test it. Start a new powershell session and do import-module "C] pointing to the psm1 file, to import the module. Afterwards you should confirm the module is imported by get-module psftp - if you get output you have the module imported. Now you should be able to use these functions: Add-FTPItem Get-FTPChildItem Get-FTPItem Get-FTPItemSize New-FTPItem Remove-FTPItem Rename-FTPItem Set-FTPConnection to check if the module is capable of what you are trying to do.
by nohandle at 2013-01-14 04:56:39
If the module is sufficient let us know, womebody will show you a proper way to use a module. Are you on powershell version 2 or version 3?