Solved

FTP: preserve the file's original date /time stamp?

Posted on 2011-03-06
4
973 Views
Last Modified: 2013-11-05
In VB6, I am using FTP to retrieve files using Microsoft Internet Transfer Control 6.0 (MSINET.OCX). I believe that this OCX changes the date stamp of each retrieved file (on my local hard drive) to be the current date / time when the file is written to my local hard drive. Is there a way to either:
A. preserve the file's original date /time stamp, or
B. read the original file's date / time (from the FTP server)?
0
Comment
Question by:lee88
  • 2
4 Comments
 
LVL 6

Expert Comment

by:judgeking
ID: 35072435
Do you have any control over how the files are placed on the FTP server?  Because if they FTDd in a ZIP file, the timestamps will be preserved when you download and unzip them.
0
 

Author Comment

by:lee88
ID: 35074767
good idea, but not in this case.
0
 
LVL 10

Accepted Solution

by:
cool12399 earned 500 total points
ID: 35095777
Yes,

Simply "touch" the file/change the timestamp, i.e., here:
http://www.experts-exchange.com/Programming/Languages/Visual_Basic/Q_20651752.html

To get the filedate time on the server, you can get that "create" date by using wininet's FtpFindFirstFile function
0
 
LVL 10

Expert Comment

by:cool12399
ID: 35095778
pps, please accept this answer now whe nfinished , thanks!
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

792 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