Solved

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

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…

816 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

12 Experts available now in Live!

Get 1:1 Help Now