Stdragon, thanks a lot for the little linkie to the manual, the file command is quite extensive
So, made some variables using the various commands, chucked them into one of the scripts i use on the channel and using the code below, it does work... bar two
the command " File atime <name> <time>" confuses me, in the help file it says this..
file atime name ?time?
Returns a decimal string giving the time at which file name was last accessed. If time is specified, it is an access time to set for the file. The time is measured in the standard POSIX fashion as seconds from a fixed starting time (often January 1, 1970). If the file doesn't exist or its access time cannot be queried or set then an error is generated. On Windows, FAT file systems do not support access time.
But what does it mean by ?time?, not sure what it is, is it a variable to put the time in?
Same problem with the "file stat name varName" . Now i understand that this creates a series of results, that need to be put into an array
VarName is treated as an array variable, and the following elements of that variable are set: atime, ctime, dev, gid, ino, mode, mtime, nlink, size, type, uid.
Yet, when i place a name of a used array, dir() in the case of this script, it gives me various errors about elements in arrays, and the fact that if i specify a variable in the brackets in dir(), it cannot be put in, i just put dir in, and it wont use it. What do i need to do to get this working?
On a lighter note, removing the references to these give me the nice little result of...
[18:06:06] <Weirdo|SimCity> !picoday
[18:06:08] -Natsuki-Chan- Pic of the Day is filesys/incoming/c23427sample7.jpg -- File information: <Directory - filesys/incoming> <Isfile - 1> <Total File - filesys/incoming/test.jpg>
[18:06:10] -Natsuki-Chan- <Modified - 1049746511> <system - native NTFS> <system volumes - C:/ D:/ E:/ F:/ G:/ H:/ I:/ J:/>
Which makes me damn happy and fills my little mind with future scripting ideas
Code: Select all
# set dir(atime) [file atime $picoday time]
set dir(dir) [file dirname $picoday]
set dir(isfile) [file isfile $picoday]
set dir(join) [file join $dir(main) $dir(filename2)]
set dir(mtime) [file mtime $picoday]
# set dir(stat) [file stat $dir()]
set dir(system) [file system $picoday]
set dir(volumes) [file volumes]
puthelp "notice $nick :Pic of the Day is $picoday -- File information: <Directory - $dir(dir)> <Isfile - $dir(isfile)> <Total File - $dir(join)>"
puthelp "notice $nick :<Modified - $dir(mtime)> <system - $dir(system)> <system volumes - $dir(volumes)>"