FTP - Transfer Files according to date time

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

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....
 

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.
 

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. :(
 

Squashman

Retired 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
 

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
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

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 807,865 other people just like you!

Latest posts

Staff online

Top