Jos,
It's better to store path into variable and use that variable in the code. If path changes, you'll have to change only one line of code. See my code in this thread for example.
>
>Assuming your files are in folder C:\FOLDER1...
>
>
>*!* Create an array of files to process
>
>nFiles = ADIR( aMyFiles, "C:\FOLDER1\*.TXT" )
>
>FOR i = 1 TO nFiles && Process each file in array
>
> *!* DO CASE is one option only. Could also use IF..ENDIF
> *!* I am trying to show you a structure for processing
> *!* based on various possible conditions.
>
> DO CASE
> CASE aMyFiles[ i, 3 ] > DATE()-5 && See if file date is less than 5 days old
>
> *!* Copy the file to new location
> COPY FILE ( "C:\FOLDER1\" + aMyFiles[ I, 1 ] ) TO ( "C:\FOLDER2\" + aMyFiles[ I, 1 ] )
>
> CASE aMyFiles[ i, 3 ] <= DATE()-5 && See if file date is more than 5 days old
>
> *!* Delete the file
> DELETE FILE ( "C:\FOLDER1\" + aMyFiles[ I, 1 ] )
>
> ENDIF
>
>NEXT && Process next file in array
>
>
--sb--