Solved

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

Posted on 2011-03-06
4
983 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses
Course of the Month11 days, 11 hours left to enroll

623 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