/
Forside
/
Teknologi
/
Udvikling
/
VB/Basic
/
Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn
*
Kodeord
*
Husk mig
Brugerservice
Kom godt i gang
Bliv medlem
Seneste indlæg
Find en bruger
Stil et spørgsmål
Skriv et tip
Fortæl en ven
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
gandalf
836
7
AntonV
790
8
strarup
750
9
Benjamin...
700
10
tom.kise
610
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 :
177557
Tips :
31968
Nyheder :
719565
Indlæg :
6408875
Brugere :
218888
Månedens bedste
Årets bedste
Sidste års bedste
Copyright © 2000-2024 kandu.dk. Alle rettigheder forbeholdes.