1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

FTP - Transfer Files according to date time

Discussion in 'DOS/Other' started by Lalita, Feb 4, 2013.

Thread Status:
Not open for further replies.
Advertisement
  1. Lalita

    Lalita Thread Starter

    Joined:
    Jan 28, 2013
    Messages:
    3
    Hi all,
    I want to transfer the .PDF files as they are getting scanned.
    1. I will scan the files in the form of PDF.
    2. I need to transfer file, according to the order in which they are scanned.
    Previously, I was transferring the files using " mput " command but as i have to transfer the file according to date time. I am stuck...
    Please help me....
     
  2. foxidrive

    foxidrive Banned

    Joined:
    Oct 20, 2012
    Messages:
    793
    Show us your script and someone can modify it for you. Just disguise the username/password/server but leave everything else.
     
  3. Lalita

    Lalita Thread Starter

    Joined:
    Jan 28, 2013
    Messages:
    3
    I am calling the commands.txt file using below command
    C:\Putty\psftp user_name server_name -pw password -b C:\Commands.txt >

    Commands.txt contains the below command
    mput C:\Folder_Name\*.pdf

    Now I am stuck here how to transfer the files according to modified/Created date time. :(
     
  4. Squashman

    Squashman Trusted Advisor

    Joined:
    Apr 4, 2003
    Messages:
    19,786
    Code:
    pushd "C:\Folder_Name"
    for /f "delims=" %%G in ('dir /b /a-d /od *.pdf') do echo mput c:\Folder_name\%%G>>commands.txt
    popd
     
  5. foxidrive

    foxidrive Banned

    Joined:
    Oct 20, 2012
    Messages:
    793
    Some changes to Squashman's idea - the only necessary thing is the /b in the DIR command.

    Code:
    @echo off
    set "folder=C:\Folder_Name"
    pushd "%folder%" 
    del commands.txt 2>nul
    for /f "delims=" %%G in ('dir /b /a-d /od *.pdf') do >>commands.txt echo mput %folder%\%%G
    popd
    
     
  6. Lalita

    Lalita Thread Starter

    Joined:
    Jan 28, 2013
    Messages:
    3
    Hi Guys,
    Thank you so much............
     
  7. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Similar Threads - Transfer Files according
  1. niedernsill
    Replies:
    3
    Views:
    251
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1088129

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice