Solved

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

Posted on 2011-03-06
4
960 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
Comment Utility
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
Comment Utility
good idea, but not in this case.
0
 
LVL 10

Accepted Solution

by:
cool12399 earned 500 total points
Comment Utility
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
Comment Utility
pps, please accept this answer now whe nfinished , thanks!
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

762 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

7 Experts available now in Live!

Get 1:1 Help Now