Welcome! Log In Create A New Profile

Advanced

SubDirectory search

Posted by emirhan 
emirhan
SubDirectory search
February 02, 2009 09:18AM
Hi all,

I try to develop a file backup program, but now I have problem that I have not solve yet. I chose a source path and there is a check box for subdirectory backup,if I click the check box and if there is sub directory, the program must copy all files and subdirectories to the destiantion. if I don't check the sub directory check box, the program must copy only the source path files to the destination. How can I copy all files and subdirectories if the check box is clicked?? Thank you
Stefan Bentvelsen
Re: SubDirectory search
February 02, 2009 09:25AM
Hi emirhan,

look in the helpfile for fDir() and fListFile(). With fListFile() you can list the files and subdirectories of a given directory.
emirhan
Re: SubDirectory search
February 02, 2009 09:40AM
Hi Stefan,

I used fListFile() when the user DOES NOT CLICK THE SUB FOLDER CHECKBOX

fListFile(W_source,"PF_FileAttribute")

but if the user CLICK "APPLY FOR SUBFOLDER" I used this code

fListFile(W_source,"PF_FileAttribute",frRecursive)

but there is no any differences because in both cases I have the same results.Both codes return me all files and sub files in a given source. How can I list only files in a given directory except sub files??

Thanks

Arie
Re: SubDirectory search
February 02, 2009 11:05AM
According to the help frRecursive is the default, so
fListFile(W_source,"PF_FileAttribute")
and
fListFile(W_source,"PF_FileAttribute",frRecursive)
are the same!

You need to submit the frNotRecursive attribute.

Arie
emirhan
Re: SubDirectory search
February 03, 2009 01:56PM

are there frNotRecursive attribute? I could not it in help file..
Stefan Bentvelsen
Re: SubDirectory search
February 03, 2009 02:06PM
Hi emirhan,

in WD12 there is. In WD10 there is not. Which version of WD do you use?
emirhan
Re: SubDirectory search
February 03, 2009 02:12PM
Hi Stefan

I use WD10 so, there is no in WD10. How can I solve that problem, I need nonRecursive directory search
Thanks
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: