A volte capita di veder lievitare le dimensioni dell'EXE ma non si
capisce il perchè..
Questo script, con l'ausilio della classe my contenuta in Sedna, crea un
cursore con tutti i files del progetto e la dimensione in byte.
Basta inserire il nome del progetto nella variabile lsProject e lanciarlo.
ciao
Fabio Lenzarini
lsproject = "vjg.pjx"
SELECT 0
USE &lsproject ALIAS progetto
COPY TO elenco.pjx
SELECT progetto
USE
USE elenco.pjx IN 0
CREATE CURSOR filesize ;
(File C(50), size N(10), tipo C(10))
local My as My
My = newobject('My', 'My.vcx')
SET STEP ON
SELECT elenco
SET FILTER TO !exclude
SCAN FOR type = "P"
loFile = My.Computer.FileSystem.GetFileInfo(ALLTRIM(name))
SELECT filesize
APPEND BLANK
replace file WITH ALLTRIM(elenco.name),;
size WITH loFile.size,;
tipo WITH "Prog"
ENDSCAN
SELECT elenco
SCAN FOR type = "M"
loFile = My.Computer.FileSystem.GetFileInfo(ALLTRIM(name))
SELECT filesize
APPEND BLANK
replace file WITH ALLTRIM(elenco.name),;
size WITH loFile.size,;
tipo WITH "Menu"
ENDSCAN
SELECT elenco
SCAN FOR type = "V"
loFile = My.Computer.FileSystem.GetFileInfo(ALLTRIM(name))
SELECT filesize
APPEND BLANK
replace file WITH ALLTRIM(elenco.name),;
size WITH loFile.size,;
tipo WITH "VCX"
loFile =
My.Computer.FileSystem.GetFileInfo(FORCEEXT(ALLTRIM(elenco.name), "vct"))
SELECT filesize
APPEND BLANK
replace file WITH ALLTRIM(elenco.name),;
size WITH loFile.size,;
tipo WITH "VCT"
ENDSCAN
SELECT elenco
SCAN FOR type = "K"
loFile = My.Computer.FileSystem.GetFileInfo(ALLTRIM(elenco.name))
SELECT filesize
APPEND BLANK
replace file WITH ALLTRIM(elenco.name),;
size WITH loFile.size,;
tipo WITH "Form"
loFile =
My.Computer.FileSystem.GetFileInfo(FORCEEXT(ALLTRIM(elenco.name), "sct"))
SELECT filesize
APPEND BLANK
replace file WITH ALLTRIM(elenco.name),;
size WITH loFile.size,;
tipo WITH "SCT"
ENDSCAN
SELECT elenco
SCAN FOR type = "x"
loFile = My.Computer.FileSystem.GetFileInfo(ALLTRIM(name))
SELECT filesize
APPEND BLANK
replace file WITH ALLTRIM(elenco.name),;
size WITH loFile.size,;
tipo WITH "BMP"
ENDSCAN
SELECT * FROM filesize ORDER BY size