Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Invalid subscript reference
Message
From
01/12/2006 14:33:04
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01173721
Message ID:
01174230
Views:
9
This message has been marked as a message which has helped to the initial question of the thread.
>>>>>This didn't work for me. It took 32 s. to create a file and the returned files are in DOS like way (short names).
>>>>
>>>>I have a similar directory, with 27400 small images. First I thought you had foxpro.pif which uses command.com instead of cmd.exe, so I invoked each and ran dir >dir.txt. The time in both cases was below a second.
>>>>
>>>>The format of the text was like this (with just plain DIR, no switches):
>>>>
22.01.2005  11:17            39,749 CP701760.jpg
>>>>22.01.2005  11:17            35,626 CP701761.jpg
>>>>09.03.2004  12:37            23,487 No-Show-Image.jpg
>>>>07.02.2006  13:27                60 nocopy.BAK
>>>>07.02.2006  13:29               284 nocopy.bat
>>>>
>>>>Maybe you could use shell_execute to run the command? Just create a .bat file and run that. Shouldn't take that long. Even with my disk being recently defragmented, the difference shouldn't be so large.
>>>
>>>Would it still show the DOS window? I'd like to avoid it. I also didn't see times, only the file names like 1234~.jpg I run the command exactly as Hilmar wrote using my folder name and *.jpg
>>>
>>>Also note, that the directory resides on the server, not on my local drive.
>>
>>I just tried:
>>DIR /S *.* > testme.txt with remote connection to our office server. This commands runs for about 5 secs and creates a beautiful file :-). Not from VFP, because we didn't have VFP installed on server, just command prompt., also it stores all files with theitr actual names, not the short version :-)
>>
>>If I run:
>>DIR /S *a*.dbf > testme.txt it returns me about 8000 names (no time to test if ALL they are correct, but first 150 are) for less then 2 secs.
>
>Thanks a lot for your tests, Borislav. Let me try to run it directly one more time.
>
>UPDATE. Looks like I can not connect to the server this moment and I have to run now. May be on Monday...

Days have become really short, haven't they?

You could even run it using Api_AppRun, as a batch, something like this:
lcDirText=fullpath("dir.txt")
lcHere=fullpath(".")
text to lcBatText textmerge noshow
cd \\server\share\d1\d2\wherever
dir -s >"<<lcDirText>>"
cd "<<lcHere>>"
endtext
lcBatFile=fullpath("dirremote.bat")
strtofile(lcBatText, lcBatFile)
oprocess=Newobject('api_apprun','process', '', lcbatFile, lcHere, 'HID')
oprocess.LaunchAppAndWait()
Release oprocess
Erase (lcbatFile)
*-- now the interesting part: import the text into a cursor, and analyze it.
*-- Left as exercise to the reader.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform