Re: Getting a complete file list from a removable disc into VFP

Author: Stephen Russell

Posted: 2011-02-18 at 09:16:34

On Thu, Feb 17, 2011 at 7:59 PM, Joe Yoder <joe@wheypower.com> wrote:

> I want to store a copy of the complete directory structure of each optical disc in my media storage system in a VFP table memo field.  I considered using recursion with adir() but concluded that it makes more sense to use something like the Windows internal command "dir" with the "/s"subdirectories option as this automatically includes file and folder sizes.

>

> I have been experimenting with Microsoft example code which uses CreateProcess and WaitForSingleObject and can have it execute an exe such as Notepad and wait for it to be closed before returning control to VFP.  When I try to execute the command "Dir" rather than "C:\Windows\System32\Notepad" I get an error.  I think the difference is that 'Dir" is an internal command but maybe it is just a syntax problem.

>

> Can someone help me out with the correct CreateProcess syntax or point me to another function?

>

> As always - a suggestion for another approach would also be welcome.

--------------------

dir /s >c:\sometextfile.txt

Then suck in those text files into your memo.

--

Stephen Russell

Sr. Production Systems Programmer

CIMSgts

901.246-0159 cell

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/AANLkTimA7mUk7avbFn6JO+tMTk6KdYEvkgW2kJY3cBur@mail.gmail.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2011 Stephen Russell