ftp file metadata retrieval
Hi all: First time posting.
I am working on an automated ftp script to download files from many servers (desktops running ftp server). I have my generic code working. As part of the script I need to download each file AND change it's name. The new name must incorporate the creation date stamp of the file.
My script runs two separate ftp sessions (have not figured out how to do it with one session yet). The first session basically tests for the server being online and it retrieves a listing of all available files and stores the listing in a local text file. The problem is the "ls" or "dir" command don't provide a time stamp, only the date. I can get the time via "modtime" but I can't figure out how to get that into my output file. What I really need is a file that looks like this:
filename timestamp
filename timestamp
.
.
.
So, can someone show me the light? Thanks much, Chris.
Last edited by cmosentine; 02-13-2012 at 01:36 PM.
|