Setting File Modification Times Without Using MDTM

Client feature requests, product gripes, and other general questions.

Locked
inrig
Posts: 7
Joined: Sat Sep 25, 2004 11:41 pm

Setting File Modification Times Without Using MDTM

Post by inrig »

Many servers do not support the (mis-)use of MDTM to set file modification times after upload. However, it seems there are other ways to set the file modification time, namely the UTIME and MFMT commands (not supported by all servers, but by some).

Question: will Core FTP support these commands? Allowing the user to select, on a per-site basis, the method to use to update file modification times (MDTM, UTIME, MFMT, or none) would be really helpful.

Alternatively, could I use a Post-transfer Script? The script would have to run after each file transfer (I assume this happens now) and would have to be able to reference the filename and the (local) file modification times as parameters. In other words, I would want to be able to put something like this into a post-transfer script:

quote UTIME %localFileTime %filename

Might either of these approaches be supported in Core FTP?
Jack777
Posts: 2
Joined: Wed Jul 06, 2011 1:15 pm

Bump

Post by Jack777 »

Hello,
Just wondering if the UTIME / MFMT commands are now supported by CoreFTP through the command line.

I was able to send a Quote command to set the UTIME for a file using the GUI(it updated the datetime accordingly on the ftp site), however am not sure how to do the same from the command line.

A sample syntax from the commandline would be really appreciated.

Thank you.
Jack777
Posts: 2
Joined: Wed Jul 06, 2011 1:15 pm

Post by Jack777 »

site utime file.txt 20090909090909 20090909090909 20090909090909 UTC

is what it would look like in QUOTE.

I could get the current datetime like:

SET FILE1=DRIVE:\PATH\FILENAME
FOR %%i IN (%FILE1%) DO SET DATE1=%%~ti
SET UTIME-YEAR=%DATE1:~6,4%
SET UTIME-MONTH=%DATE1:~0,2%
SET UTIME-DAY=%DATE1:~3,2%
SET UTIME-HOUR=%DATE1:~11,2%
SET UTIME-MINUTE=%DATE1:~8,2%
ECHO %UTIME-YEAR%%UTIME-MONTH%%UTIME-DAY%%UTIME-HOUR%%UTIME-MINUTE%

But is it possible to invoke/Call QUOTE from command prompt ?
Please advise.
Thank you.
ForumAdmin
Site Admin
Posts: 987
Joined: Mon Mar 24, 2003 4:37 am

Post by ForumAdmin »

It is, but you would need to put the command into a file, and then use the script option in the command line (-scat <script_file_name>).

corecmd.exe -s -site yoursite -script yourscript -u c:\local_path\filename -p /remote_path/
Locked