| View previous topic :: View next topic |
| Author |
Message |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Fri Apr 02, 2004 9:07 pm Post subject: How can I count files and folders without using LIST? |
|
|
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 |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Fri Apr 02, 2004 11:39 pm Post subject: Re: How can I count files and folders without using LIST? |
|
|
| 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 |
|
 |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Fri Apr 02, 2004 11:46 pm Post subject: |
|
|
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?  |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sat Apr 03, 2004 12:00 am Post subject: |
|
|
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.  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Sat Apr 03, 2004 12:07 am Post subject: |
|
|
Is there a way to run a Progress Meter till the DOS RUN cmd... is all the way done?  |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sat Apr 03, 2004 12:11 am Post subject: |
|
|
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 |
|
 |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Sat Apr 03, 2004 12:16 am Post subject: |
|
|
| 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.
 |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sat Apr 03, 2004 12:22 am Post subject: |
|
|
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  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Sat Apr 03, 2004 12:53 am Post subject: |
|
|
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 |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
|
| Back to top |
|
 |
|