FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour C贸mo saber que un archivo cambio de tama帽o
Posts: 1710
Joined: Tue Oct 28, 2008 06:26 PM
C贸mo saber que un archivo cambio de tama帽o
Posted: Wed Oct 21, 2009 04:37 PM

Hola a todos

No se como hacerlo. Antonio me dijo con Directory(), Pero c贸mo?

Gracias por la ayuda

Saludos

Saludos,



Adhemar C.
Posts: 1054
Joined: Sun Oct 09, 2005 10:41 PM
Re: C贸mo saber que un archivo cambio de tama帽o
Posted: Wed Oct 21, 2009 04:41 PM
Code (fw): Select all Collapse
 
DIRECTORY(<cDirSpec>, [<cAttributes>]) --> aDirectory

聽Arguments

聽 聽 聽<cDirSpec> identifies the drive, directory and file specification
聽 聽 聽for the directory search. 聽Wildcards are allowed in the file
聽 聽 聽specification. 聽If <cDirSpec> is omitted, the default value is *.*.

聽 聽 聽<cAttributes> specifies inclusion of files with special attributes
聽 聽 聽in the returned information. 聽<cAttributes> is a string containing one
聽 聽 聽or more of the following characters:

聽 聽 聽DIRECTORY() Attributes
聽 聽 聽------------------------------------------------------------------------
聽 聽 聽Attribute 聽 聽Meaning
聽 聽 聽------------------------------------------------------------------------
聽 聽 聽H 聽 聽 聽 聽 聽 聽Include hidden files
聽 聽 聽S 聽 聽 聽 聽 聽 聽Include system files
聽 聽 聽D 聽 聽 聽 聽 聽 聽Include directories
聽 聽 聽V 聽 聽 聽 聽 聽 聽Search for the DOS volume label and exclude all other files
聽 聽 聽------------------------------------------------------------------------

聽 聽 聽Normal files are always included in the search, unless you specify V.

聽Returns

聽 聽 聽DIRECTORY() returns an array of subarrays, with each subarray containing
聽 聽 聽information about each file matching <cDirSpec>. 聽The subarray has the
聽 聽 聽following structure:

聽 聽 聽DIRECTORY() Subarray Structure
聽 聽 聽------------------------------------------------------------------------
聽 聽 聽Position 聽 聽 Metasymbol 聽 聽 Directry.ch
聽 聽 聽------------------------------------------------------------------------
聽 聽 聽1 聽 聽 聽 聽 聽 聽cName 聽 聽 聽 聽 聽F_NAME
聽 聽 聽2 聽 聽 聽 聽 聽 聽cSize 聽 聽 聽 聽 聽F_SIZE
聽 聽 聽3 聽 聽 聽 聽 聽 聽dDate 聽 聽 聽 聽 聽F_DATE
聽 聽 聽4 聽 聽 聽 聽 聽 聽cTime 聽 聽 聽 聽 聽F_TIME
聽 聽 聽5 聽 聽 聽 聽 聽 聽cAttributes 聽 聽F_ATTR
聽 聽 聽------------------------------------------------------------------------

聽 聽 聽If no files are found matching <cDirSpec> or if <cDirSpec> is an illegal
聽 聽 聽path or file specification, DIRECTORY() returns an empty ({}) array.

聽Description

聽 聽 聽DIRECTORY() is an environment function that returns information about
聽 聽 聽files in the current or specified directory. 聽It is similar to ADIR(),
聽 聽 聽but returns a single array instead of adding values to a series of
聽 聽 聽existing arrays passed by reference.

聽 聽 聽Use DIRECTORY() to perform actions on groups of files. 聽In combination
聽 聽 聽with AEVAL(), you can define a block that can be applied to all files
聽 聽 聽matching the specified <cDirSpec>.

聽 聽 聽The header file, Directry.ch, in the \CLIP53\INCLUDE subdirectory
聽 聽 聽contains #defines for the subarray subscripts, so that the references to
聽 聽 聽each file subarray are more readable.

聽Examples

聽 聽 聽. 聽This example creates an array of information about files in
聽 聽 聽 聽 the current directory and then lists the names of the files using
聽 聽 聽 聽 AEVAL() and QOUT():

聽 聽 聽 聽 #include "Directry.ch"
聽 聽 聽 聽 //
聽 聽 聽 聽 aDirectory := DIRECTORY("*.*", "D")
聽 聽 聽 聽 AEVAL( aDirectory, {|aFile| QOUT(aFile[F_NAME])} )


Salu2
Posts: 1710
Joined: Tue Oct 28, 2008 06:26 PM
Re: C贸mo saber que un archivo cambio de tama帽o
Posted: Wed Oct 21, 2009 07:58 PM

Gracias Wili

Sigo en la misma, no se como tengo que preguntar si cambio el tama帽o para que haga una acci贸n.
Se me ocurre con FILESIZE, lo intentar茅.

Gracias una vez mas, necesito mas ayuda.

Saludos

Adhemar

Saludos,



Adhemar C.

Continue the discussion