/
Forside
/
Teknologi
/
Udvikling
/
VB/Basic
/
Nyhedsindlæg
Login
Brugernavn
*
Kodeord
*
Husk mig
Brugerservice
Kom godt i gang
Bliv medlem
Seneste indlæg
Stil et spørgsmål
Skriv et tip
Pointsystemet
Kontakt Kandu.dk
Emnevisning
Kategorier
Alfabetisk
Karriere
Interesser
Teknologi
Reklame
Top 10 brugere
VB/Basic
#
Navn
Point
1
berpox
2425
2
pete
1435
3
CADmageren
1251
4
gibson
1230
5
Phylock
887
6
AntonV
790
7
strarup
750
8
Benjamin...
700
9
tom.kise
610
10
EXTERMINA..
600
directory problems
Fra :
asd987
Dato :
13-05-04 20:34
Hi,
Ihave 2 small questions:
1. Is the only way to deltet a directory including the files in that
directory to first chdir to directory, then remove all the files and at last
rmdir the directory? Or is there something lijke the UNIX-command rm -r *
2. How can I determine the size of a directory? Like in the prperties of a
directory where the size is diplayed in MB.
Thanks.
Morten W. Nissen (
13-05-2004
)
Kommentar
Fra :
Morten W. Nissen
Dato :
13-05-04 21:56
> 1. Is the only way to deltet a directory including the files in that
> directory to first chdir to directory, then remove all the files and at
last
> rmdir the directory? Or is there something lijke the UNIX-command rm -r *
In this case you need to destroy the folder and create it again.
dim fso as new filesystemobject
dim pathTofolderToNuke as string
pathTofolderToNuke = "c:\winnt"
fso.deletefolder(pathTofolderToNuke ,true)
fso.createfolder pathTofolderToNuke
The true tells fso to force, and dont care about readonly files etc.
After this the folder is
> 2. How can I determine the size of a directory? Like in the prperties of a
> directory where the size is diplayed in MB.
>
Here i guess you need to make a collection of files and then sum up the
size.
Regards,
Morten
Søg
Alle emner
Teknologi
Udvikling
VB/Basic
Indstillinger
Spørgsmål
Tips
Usenet
Reklame
Statistik
Spørgsmål :
177817
Tips :
31980
Nyheder :
719565
Indlæg :
6410968
Brugere :
218912
Månedens bedste
Årets bedste
Sidste års bedste
Copyright © 2000-2026 kandu.dk. Alle rettigheder forbeholdes.