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

Windows PowerShell FTP question

Good day

I am working on Windows PowerShell script
I have to find the oldest file out of several files with specific name pattern (say file_1234, file_0989, file _0909) from Linux box and transfer to Windows 7 machine
My PowerShell skills are rusty

Would appreciate any help

Thank you,


1 Solution
I know this isn't what you asked for but since nobody else responded yet here is a Robo-FTP script to get the oldest file matching file_1234:
FTPLOGON "ftp.linuxserver.com" /user="userID" /pw="secret"
GETSITEFILE "file_1234*" /oldest
RCVFILE %sitefile

Open in new window

mattyinteractiveAuthor Commented:

thank you. I had solved the problem by adding timestamp to filename on the server side
After that I was getting file listiing via ftp "dir" command, sorted ascending and getting last entry
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

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

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