From: Rob van Erk on
Hello,

Hope someone can help me urgently with the following problem.

I have a directory on a server with 400000 files and all files with a
date older then today must be deleted. When startin up Windows
Explorer it take ages before I can delete the relevant files so I
thought.... why not using a small VO application.

Why do I get a Dynamic Memory is low (a the aDirectory := Directory
(..) row) if the number of files in the relevant directory is 400000?

Thanks for any support you can give.

I developed the following source:

METHOD Start() CLASS App
local aDirectory := {500000} as array
local l as Long
local sFile as String
local aantal as long
local gevonden as logic
local ltest as logic
local suitkomst as string

aDirectory := Directory("D:\Program Files\Rightfax\DocTransport
\*.IPK","D")
gevonden := 0

aantal := Len(aDirectory)

if Yesnobox("Warning","'Run test only?")
ltest := true
endif

if aantal <> 0

FOR l = 1 to aantal
IF CToD(AsString(aDirectory[l][F_DATE])) <> Today()
sFile := "D:\Program Files\Rightfax\DocTransport\" + AsString
(aDirectory[l] [F_NAME])
// ? sFile
gevonden := gevonden + 1
if !ltest
? gevonden
FErase(sFile)
endif
ENDIF
NEXT
if ltest
suitkomst := AsString(gevonden) + ' gevonden'
else
suitkomst := AsString(gevonden) + ' gevonden & verwijderd'
endif
Showerr(suitkomst)

else
"Er zijn geen files"
endif
return
From: Alessandro Antonangeli on
Il Thu, 24 Dec 2009 11:07:22 -0800, Rob van Erk ha scritto:

> Hello,
>
> Hope someone can help me urgently with the following problem.
>
> I have a directory on a server with 400000 files and all files with a
> date older then today must be deleted. When startin up Windows Explorer
> it take ages before I can delete the relevant files so I thought.... why
> not using a small VO application.
>
> Why do I get a Dynamic Memory is low (a the aDirectory := Directory (..)
> row) if the number of files in the relevant directory is 400000?
>
> Thanks for any support you can give.
>
> I developed the following source:
>

May be you have to increase Dynamic memory with SetMaxDynSize() or better
use other file manager utility like Midnight Commander


--
Ciao Alessandro
From: Alessandro Antonangeli on
Il Thu, 24 Dec 2009 11:07:22 -0800, Rob van Erk ha scritto:

> Hello,
>
> Hope someone can help me urgently with the following problem.
>
> I have a directory on a server with 400000 files and all files with a
> date older then today must be deleted. When startin up Windows Explorer
> it take ages before I can delete the relevant files so I thought.... why
> not using a small VO application.
>
> Why do I get a Dynamic Memory is low (a the aDirectory := Directory (..)
> row) if the number of files in the relevant directory is 400000?
>
> Thanks for any support you can give.
>
> I developed the following source:
>

May be you have to increase Dynamic memory with SetMaxDynSize() or better
use other file manager utility like Midnight Commander


--
Ciao Alessandro
From: Alessandro Antonangeli on
Il Thu, 24 Dec 2009 11:07:22 -0800, Rob van Erk ha scritto:

> Hello,
>
> Hope someone can help me urgently with the following problem.
>
> I have a directory on a server with 400000 files and all files with a
> date older then today must be deleted. When startin up Windows Explorer
> it take ages before I can delete the relevant files so I thought.... why
> not using a small VO application.
>
> Why do I get a Dynamic Memory is low (a the aDirectory := Directory (..)
> row) if the number of files in the relevant directory is 400000?
>
> Thanks for any support you can give.
>
> I developed the following source:
>

May be you have to increase Dynamic memory with SetMaxDynSize() or better
use other file manager utility like Midnight Commander


--
Ciao Alessandro
From: Rob van Erk on
Thanks Alessandro,

This solved my problem !

Wish you a nice Christmas.

Brgds,
Rob
 |  Next  |  Last
Pages: 1 2
Prev: Harbour 2.0 released
Next: Anchors in CHM besed help