This driving me Mad, Help !!!! - WeOnlyDo Discussion board

This driving me Mad, Help !!!! (General questions)

by Darren, Wednesday, May 18, 2005, 11:22 (7128 days ago)

Hi

I need to get a full directory listing for a directory, just the sub directories, not bothered about the files.

I dont know how many sub directories there are !

Right I have say 10 driectories on the ftp :

/a
/b
/c
/d

ect

I need to scan the full server but want to scan the directory's individually i.e

do a recursive scan of /a and all sub dirs and sub sub dirs (dont know what the sub dir levels are) and them pipe the contents to a text file.

Then do the same on all of the root dirs.

Been messing with this for days and insanity is very very near.

Please couls someone supply some code to do this (pretty Please)

Regards

darren

and

Re: This driving me Mad, Help !!!!

by wodSupport, Wednesday, May 18, 2005, 11:51 (7128 days ago) @ Darren

Darren,

I suggest you use LoopFiles method. Once started, on each directory item LoopItem event will fire. You can test there to see if item is a file or new folder - and just add it to your own collection if it's a folder. That should do the trick!

Re: This driving me Mad, Help !!!!

by Darren, Wednesday, May 18, 2005, 11:59 (7128 days ago) @ wodSupport

I have tryed with loop files and listdir and listnames but just can seem to get them to work, any chance of some sample code, this would really help me out.

Regards

Darren,

I suggest you use LoopFiles method. Once started, on each directory item LoopItem event will fire. You can test there to see if item is a file or new folder - and just add it to your own collection if it's a folder. That should do the trick!

Re: This driving me Mad, Help !!!!

by Darren, Wednesday, May 18, 2005, 20:37 (7128 days ago) @ Darren

Got it sorted.

Thanks

Re: This driving me Mad, Help !!!!

by Darren, Thursday, May 19, 2005, 15:50 (7127 days ago) @ Darren

Hi

Got most things working now, be another question, if Im using loop_item and say I come across a directory say full with symbolic links is there anyway to skip that directory and carry on with the next ?

Darren


Re: This driving me Mad, Help !!!!

by wodSupport, Thursday, May 19, 2005, 16:33 (7127 days ago) @ Darren

Darren,

before you entered directory, when its name appeared in parent directory, you could have set Skip = True, and wodFtpDLX wouldn't enter that directory at all. Would that help?

Re: This driving me Mad, Help !!!!

by Darren, Thursday, May 19, 2005, 17:09 (7127 days ago) @ wodSupport

Hi

Thats work very well.

Can I just say that you customer service is excelent, shame there are not a few more companies like your's out there.

Once again thanks for you help

Regards

Darren