creating files issues

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
davestewart
Posts: 114
Joined: March 10th, 2005, 5:50 am
Location: London, UK
Contact:

Hi all,

As part of a wider project, I need to know the time After Effects is started on each session. I was going to add a script to the startup folder that automatically creates a new file each time the app is run but have found a strange (windows?) problem...

Run the following script a few times:

Code: Select all

// get file
	fName='tmp.txt'
	f=File(fName)

// delete old file
	if(f.exists)if(confirm("Delete file?"))f.remove()

// write new file
	f.open('w','????','????')
	f.writeln(Math.random())
	f.close()
You'll see in the Windows Explorer that when the file is re-created, the creation time is that of when the file was created the first time, even though (in theory) this is a new file.

It's rather odd - any ideas!?

Thanks,
Dave
Post Reply