Solved

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

Posted on 2011-03-06
4
963 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
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…

895 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

14 Experts available now in Live!

Get 1:1 Help Now