Jump to content

Recommended Posts

Posted

hey all,

i'm trying to use FileGetTime in a bot but i'm stuck in this error:

CODE
$temp = FileFindNextFile($search)

$d = FileGetTime($temp)

$date = $d[0] & $d[1] & $d[2] & $d[3] & $d[4] & $d[5]

the error i got is the following:

==> Subscript used with non-Array variable.:

$date = $d[0] & $d[1] & $d[2] & $d[3] & $d[4] & $d[5]

$date = $d^ ERROR

Can someone help me? thanks from the newbie...

Posted

FileGetTime() needs the full path to the file, which would be the path used for FileFindFirstFile().

$path = "C:\"

$search = FileFindFirstFile($path....)

.

.

.

$temp = FileFindNextFile($search)

$d = FileGetTime($path & $temp)

$date = $d[0] & $d[1] & $d[2] & $d[3] & $d[4] & $d[5]

Posted

The problem was in the path, as Wolverine said. FileFindFisrtFile doesn't return the hole file name with the path, you have to add it by yourself.

Thanks!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...