473,386 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

empty folder

Hi,

How can I know whether a folder is empty using FileSystemObject? Thanks.

Atse
Jul 19 '05 #1
3 2315
Set oFSO = Server.CreateObject("Scripting.FileSystemObject")

bDirIsEmpty =
Server.CreateObject("Scripting.FileSystemObject"). GetFolder("C:\path").Files
..Count = 0

Ray at work

"atse" <du******@yahoo.com> wrote in message
news:11*********************@news04.bloor.is.net.c able.rogers.com...
Hi,

How can I know whether a folder is empty using FileSystemObject? Thanks.

Atse

Jul 19 '05 #2
Thanks, Ray. Any idea with the previous question regarding "import txt into
database"?

"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:Or**************@tk2msftngp13.phx.gbl...
Set oFSO = Server.CreateObject("Scripting.FileSystemObject")

bDirIsEmpty =
Server.CreateObject("Scripting.FileSystemObject"). GetFolder("C:\path").Files .Count = 0

Ray at work

"atse" <du******@yahoo.com> wrote in message
news:11*********************@news04.bloor.is.net.c able.rogers.com...
Hi,

How can I know whether a folder is empty using FileSystemObject? Thanks.

Atse


Jul 19 '05 #3

"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:Or**************@tk2msftngp13.phx.gbl...
Set oFSO = Server.CreateObject("Scripting.FileSystemObject")

bDirIsEmpty =
Server.CreateObject("Scripting.FileSystemObject"). GetFolder("C:\path").Files .Count = 0
I don't know how to determine this folder is empty by these code?

Ray at work

"atse" <du******@yahoo.com> wrote in message
news:11*********************@news04.bloor.is.net.c able.rogers.com...
Hi,

How can I know whether a folder is empty using FileSystemObject? Thanks.

Atse


Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: atse | last post by:
Hi, I still don't know how to determine a empty folder. Can you tell me more detail? thanks Atse "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message...
13
by: could ildg | last post by:
I want to check if a folder named "foldername" is empty. I use os.listdir(foldername)== to do this, but it will be very slow if the folder has a lot of sub-files. Is there any efficient ways to do...
7
by: Brad | last post by:
When debugging my current web project, in VS2003, I found I had lost the ability to drill down on watch objects in the Watch Window; I could only view the single value specific watch objects. ...
6
by: Curious | last post by:
In a given folder, there are many sub-folders. Is there an easy way to find out those sub-folders that don't contain any file (empty sub- folders)? Is there such a utility in .NET?
7
by: ITAutobot25 | last post by:
My delete button is not working in my GUI and my due date is today before midnight. Can anyone show me how to correct this error? My assignment statement is below as well as 5 classes. InventoryGUI...
5
by: fniles | last post by:
I am using VB.NET 2005. When I try to delete a folder that has files underneath it, it gave me "the directory is not empty" error. f = New IO.DirectoryInfo("C:\myfolder") If f.Exists Then...
1
by: Christian Heimes | last post by:
otaeris@o2.pl schrieb: As far as I remember the zip format it's not possible at all. Folders are created implicitly. The zip format doesn't support empty directories. Christian
5
by: Per Juul Larsen | last post by:
Hi. My application creates empty libraries. How do I ensure that the user copies at least one or more picture files (.jpg) in each of the empty folders ? Result , no empty folders! regards pjl
0
by: samz | last post by:
Hello, Here is a simple PHP recursive file list (with interactive and visual FX) Sam's Files http://acc.jexiste.ch/JPN/RecurciveDIR12.RAR 1. How to ignore/avoid empty folders in this PHP script...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.