forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


How can I count files and folders without using LIST?

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
vtol
Valued Contributor
Valued Contributor


Joined: 05 Feb 2004
Posts: 656
Location: Eastern Indiana

PostPosted: Fri Apr 02, 2004 9:07 pm    Post subject: How can I count files and folders without using LIST? Reply with quote

How can I count files and folders without using LIST?

I checked DIRECTORY command and @file command, I need to know how many files and folders there are to be able to know when to stop the please wait indicator properly.

I'm using the below which takes awhile if heavy folder:

Code:
RUN cmd.exe /c dir %%workspot /s /b > %%data,wait 35
wait 1


I'm trying to create a Progress meter for the above actually...
But I need some kind of a trusty KNOWN for when the RUN is done.
Back to top
View user's profile Send private message Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Fri Apr 02, 2004 11:39 pm    Post subject: Re: How can I count files and folders without using LIST? Reply with quote

vtol777 wrote:
How can I count files and folders without using LIST


You can try the VDSFLIST.DLL, part of the VDSDLL3.DLL package, that
uses a non-vds list.

vtol777 wrote:
But I need some kind of a trusty KNOWN for when the RUN is done.


You might look at the function @retcode() to get a return code from the
DOS prompt.

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
vtol
Valued Contributor
Valued Contributor


Joined: 05 Feb 2004
Posts: 656
Location: Eastern Indiana

PostPosted: Fri Apr 02, 2004 11:46 pm    Post subject: Reply with quote

It would be nice to view each @item(1) that was added to the text file that the RUN cmd... creates at creation time (LIVE).
RUN CMD... EXAMPLE:

Code:
RUN cmd.exe /c dir c:\windows /s /b > c:\test\test.txt



Do you know how to do that? Smile
Back to top
View user's profile Send private message Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sat Apr 03, 2004 12:00 am    Post subject: Reply with quote

If you mean import the output directly into VDS, you can use @pipe()

If you meant that you want to process each item realtime, it's not possible,
since the script will not continue executing until the DOS program finishes. Smile

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
vtol
Valued Contributor
Valued Contributor


Joined: 05 Feb 2004
Posts: 656
Location: Eastern Indiana

PostPosted: Sat Apr 03, 2004 12:07 am    Post subject: Reply with quote

Is there a way to run a Progress Meter till the DOS RUN cmd... is all the way done? Smile
Back to top
View user's profile Send private message Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sat Apr 03, 2004 12:11 am    Post subject: Reply with quote

I'm afraid not if you're using a DOS program - another alternative is just
to launch another compiled VDS EXE and have it write realtime to a data
file or communicate with your main EXE so you can display a progress dialog.

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
vtol
Valued Contributor
Valued Contributor


Joined: 05 Feb 2004
Posts: 656
Location: Eastern Indiana

PostPosted: Sat Apr 03, 2004 12:16 am    Post subject: Reply with quote

Code:
RUNH cmd.exe /c dir c:\windows /s /b > c:\test\test.exe
info Return code was @retcode()


The Return code is allways 0

So could I use that with Timers?

Cuase I want the Progress Meter displayed on the main VDS program.
Unless theres a way to draw the Progress Meter on my Main VDS prog.
Rolling Eyes
Back to top
View user's profile Send private message Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sat Apr 03, 2004 12:22 am    Post subject: Reply with quote

There's no way to get real-time information from a DOS program with
any version of VDS. If there was a version that supported threads, then
it might be possible. But for now I think you will need to stick with either
LIST FILELIST or use the VDSFLIST.DLL Smile

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
vtol
Valued Contributor
Valued Contributor


Joined: 05 Feb 2004
Posts: 656
Location: Eastern Indiana

PostPosted: Sat Apr 03, 2004 12:53 am    Post subject: Reply with quote

Where can I find this:

Quote:
You can try the VDSFLIST.DLL, part of the VDSDLL3.DLL package, that
uses a non-vds list.


If I know when a DOS program is done, I can figure why I can't run another script???
Back to top
View user's profile Send private message Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sat Apr 03, 2004 1:22 am    Post subject: Reply with quote

You can download the VDSDLL3.DLL here:
http://www.vdsworld.com/index.php?page=download&fileid=60

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group