by hitzzz at 2013-01-13 15:27:58
Hello,by Klaas at 2013-01-14 00:11:18
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
Regards,
Hitesh
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
Hi,by Infradeploy at 2013-01-14 01:47:08
Below are 2 different url in which script is provided, I want to use any one of them.
1. http://gallery.technet.microsoft.com/sc … cb#content
2. https://github.com/ruslander/Nutshells (ftp-ls.ps1 – is the script & readme.txt is the sample script)
Thanks,
Hitesh
Here’s an Powershell FTP module: http://gallery.technet.microsoft.com/sc … t-db6fe0cbby hitzzz at 2013-01-14 02:54:11
Seems to me it’s usable for the things you want
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]by nohandle at 2013-01-14 04:56:39
Hi, download the module and extract it somewhere to test it. Start a new powershell session and doimport-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
to check if the module is capable of what you are trying to do.
Get-FTPChildItem
Get-FTPItem
Get-FTPItemSize
New-FTPItem
Remove-FTPItem
Rename-FTPItem
Set-FTPConnection
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?