FTP - Upload Only New Files - More file extensions
Moderator: DosItHelp
FTP - Upload Only New Files - More file extensions
Hi all, I am using Upload Only New Files script http://www.dostips.com/DtCodeBatchFiles.php#Batch.FtpBatchUploadOnlyNewFiles...
I need to upload multiple file types...example .txt .jpg .doc
how can I define this rule in the filter...Set FindStrArgs=/E /C:".txt"?
Thanks in advance
I need to upload multiple file types...example .txt .jpg .doc
how can I define this rule in the filter...Set FindStrArgs=/E /C:".txt"?
Thanks in advance
Re: FTP - Upload Only New Files - More file extensions
marc80 wrote:Hi all, I am using Upload Only New Files script http://www.dostips.com/DtCodeBatchFiles.php#Batch.FtpBatchUploadOnlyNewFiles...
I need to upload multiple file types...example .txt .jpg .doc
how can I define this rule in the filter...Set FindStrArgs=/E /C:".txt"?
Thanks in advance
Those are just the predefined arguments for the FINDSTR command. Read the Help file for the findstr command.
Code: Select all
findstr /?
You should be able to do one of the following.
Set FindStrArgs=/I /E /C:".txt" /C:".pdf"
Set FindStrArgs=/I /E ".txt .pdf"
Re: FTP - Upload Only New Files - More file extensions
Great...thank you
Another important thing...
the scipt check if there are any new files to upload ... ok
I would like to check last modified date of the files in the local folder and replace files in the remote folder if they are older
Thanks in advance
Another important thing...
the scipt check if there are any new files to upload ... ok
I would like to check last modified date of the files in the local folder and replace files in the remote folder if they are older
Thanks in advance
Re: FTP - Upload Only New Files - More file extensions
You will probably find that files on an FTP server take the remote server time as the timestamp when they are uploaded.
They will never be the same timestamp as the local file copies.
They will never be the same timestamp as the local file copies.
Re: FTP - Upload Only New Files - More file extensions
Yes I know....but not creation date....maybe... It is possible to check the last modified date of the file?
There must be a solution to this...
There must be a solution to this...
Re: FTP - Upload Only New Files - More file extensions
I would also create a log file to be saved in the local folder with all the operations performed by the script, pretty much what you see in the dos window with the name like 19-11-2012 (PC today's date)
can someone help me please?
can someone help me please?
-
- Posts: 5
- Joined: 29 Jan 2015 01:57
Re: FTP - Upload Only New Files - More file extensions
I would like to know if someone has already answers his query as I also need to know how to achieve this via script.
-
- Posts: 5
- Joined: 29 Jan 2015 01:57
Re: FTP - Upload Only New Files - More file extensions
does anyone know how to do this checking the timestamp and date
Re: FTP - Upload Only New Files - More file extensions
marc80 wrote:Yes I know....but not creation date....maybe... It is possible to check the last modified date of the file?
There must be a solution to this...
The FTP server may not use any of the NTFS timestamps.
You can test that yourself by uploading a file, and downloading it again, and then compare the creation time/last modifed times etc of both copies.
Re: FTP - Upload Only New Files - More file extensions
Timestamps get tricky on ftp servers. I deal with it on a daily basis. Hard to do with a batch file so we use a third party program called WatchFtp.
Re: FTP - Upload Only New Files - More file extensions
Squashman wrote:Timestamps get tricky on ftp servers. I deal with it on a daily basis. Hard to do with a batch file so we use a third party program called WatchFtp.
Sounds reasonable.
Zipping into a file or uploading a companion text file with the date-timestamp added in the name could work too.