Subj : Re: Renaming/dating directories FTP server (date) on content directorie To : Steve From : CBFalconer Date : Sat Dec 01 2001 07:20 pm From: CBFalconer "E. S. (Steve) Fabian" wrote: > > reply@newsgroup.please wrote: > > > > Situation: disk for FTP server crashes. All directories have to be recreated. > > But they now get all the same date (today). For users this is irritating, > > because now they cann't check whether a (sub)directory has been added. > > > > I would like to re*date* all (sub)directories on basis of the content of the > > folders: be it on the biggest .exe file or date of the file with the most > > recent date. > > > > Can this be done using 4Dos ? > > Unfortunately, the underlying OS treats directory files differently than > other files. Thus the only way to create a subdirectory with a specific > date and time is to change the system date and time. Tedious, but you > can automate it in 4DOS; the biggest problem is that of restoring the > proper date and time when done. > > Invocation: makedir dir date time > > @echo off > setlocal > set d=%_date > set t=%_time > echo %2 | date > echo %3 | time > md %dir > echo %t | time > echo %d | date > > NB: Every method of creating a FAT/VFAT/FAT32 subdirectory has this > limitation. Don't know about NTFS. Slight improvement (note md command): @echo off setlocal set d=%_date set t=%_time echo %2 | date >nul echo %3 | time >nul md %1 echo %t | time >nul echo %d | date >nul Needs some complications to validate parameters and/or to take input from the output of "dir /a:d". -- Chuck F (cbfalconer@yahoo.com) (cbfalconer@XXXXworldnet.att.net) Available for consulting/temporary embedded and systems. (Remove "XXXX" from reply address. yahoo works unmodified) mailto:uce@ftc.gov (for spambots to harvest) --- BBBS/NT v4.01 Flag-2 * Origin: Mach2 Systems (1:342/3) .