Windows PowerShell FTP question

Posted on 2011-04-20
Last Modified: 2012-06-21
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,


Question by:mattyinteractive
    LVL 16

    Accepted 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 "" /user="userID" /pw="secret"
    GETSITEFILE "file_1234*" /oldest
    RCVFILE %sitefile

    Open in new window


    Author Comment


    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

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    First some basics on Windows 7 Backup.  It has 2 components one is a file based backup which is stored in .zip files each zip is split at around 200 Megabytes and there is the Image Backup which is as the name implies a total image of the partition …
    If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
    In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
    This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now