![]() |
File count |
Post Reply
|
| Author | |
mosenkum
Groupie
Joined: 09 July 2008 Location: India Status: Offline Points: 25 |
Post Options
Thanks(0)
Quote Reply
Topic: File countPosted: 11 July 2008 at 1:18am |
|
how to count number of files
|
|
![]() |
|
Aaron
Senior Member
Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
Quote Reply
Posted: 11 July 2008 at 2:13am |
|
Hi,
1 + 1 = 2
2 + 1 = 3
and so on...
|
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
![]() |
|
mosenkum
Groupie
Joined: 09 July 2008 Location: India Status: Offline Points: 25 |
Post Options
Thanks(0)
Quote Reply
Posted: 11 July 2008 at 2:26am |
|
I am not able to get you.
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 11 July 2008 at 2:43am |
|
it was joke.
Use this formula:
number of files = (number of file and directories) - (number of directories)
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
mosenkum
Groupie
Joined: 09 July 2008 Location: India Status: Offline Points: 25 |
Post Options
Thanks(0)
Quote Reply
Posted: 11 July 2008 at 2:59am |
|
How i can get no files and dir?
|
|
![]() |
|
Aaron
Senior Member
Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
Quote Reply
Posted: 11 July 2008 at 3:45am |
|
Hi,
Oleg you made a mistake, if you substract the number of directories you will have a major error and VB IDE will crash
Think you have to add some feature to have this fixed. I will write to support to fix this ![]() Thanks
|
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 11 July 2008 at 3:46am |
|
Hello, try to ask question right - what exactly you need? Number of files in some directory/whole disk/ etc.
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
mosenkum
Groupie
Joined: 09 July 2008 Location: India Status: Offline Points: 25 |
Post Options
Thanks(0)
Quote Reply
Posted: 11 July 2008 at 4:59am |
|
Number of files in some directory
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 11 July 2008 at 5:36am |
|
Here some code
Set fso = CreateObject("Scripting.FileSystemObject")
' Get Folders collection. Set oFolders = fso.GetFolder(Root) Set oFiles = oFolders.Files
For Each oFile In oFiles Debug.Print oFile.Name
Next for details see in MSDN FileSystemObject
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Baldur
Senior Member
Joined: 22 November 2006 Location: Germany Status: Offline Points: 244 |
Post Options
Thanks(0)
Quote Reply
Posted: 11 July 2008 at 7:24am |
|
Check directly for oFiles.Count if you don't need the names.
|
|
![]() |
|
mosenkum
Groupie
Joined: 09 July 2008 Location: India Status: Offline Points: 25 |
Post Options
Thanks(0)
Quote Reply
Posted: 11 July 2008 at 7:35am |
|
How to use the code in vc++
|
|
![]() |
|
Baldur
Senior Member
Joined: 22 November 2006 Location: Germany Status: Offline Points: 244 |
Post Options
Thanks(0)
Quote Reply
Posted: 14 July 2008 at 3:28am |
|
In C++ its easy, you can use the functions:
FindFirstFile()
FindNextFile()
FindClose()
|
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |