[tpm] Change create date of a directory
Indy Singh
indy at indigostar.com
Tue May 22 18:56:32 PDT 2012
Hi all,
Is there a Perl way of changing the create date of a directory? utime only
seems to allow changing the access and modification time.
I may going about this the wrong way. Perhaps someone can comment.
What I am trying to do (simplified example) is create a makefile that will
copy file from an input directory to an output directory if any input file
is newer than the output file.
I am working on Windows 7, with microsoft nmake, and cygwin touch.
Makefile #1 below works, but has the disadvantage that it requires 3 targets
and a dummy file has to be left lying around.
Makefile #2 uses the timestamp of the output directory as the dummy target.
It almost works except that the nmake that I am using seems to look at the
'create' date of the directory rather than the 'modified' date. This is
probably a bug in nmake, but I don't want to use something else otherwise it
will start a chain reaction of more changes to existing makefile.
MAKEFILE #2
outdir: indir\*.pl
if not exist $@ mkdir $@
for %f in ($?) do copy %f outdir
touch $@
MAKEFILE #1
outdir:
mkdir $@
outdir\dummy: indir\*.pl
for %f in ($?) do copy %f outdir
touch outdir\dummy
try: outdir indir\dummy
Indy Singh
IndigoSTAR Software -- www.indigostar.com
More information about the toronto-pm
mailing list