get all directories in all o/s
i need help listing all diretories in
winxp
vista / 7/ 8
should show all folders only thanks.
:phow do i use if statement
if windows xp then show directories
if vista then show directories
if win 7 then show dir
bec folder path and names are different so i thihnk if statement is good for me but need example:p
Re: get all directories in all o/s
Do you mean all directories on a single drive or throughout the whole operating system?
Re: get all directories in all o/s
I can't think of any reason that you would need to check the OS. There are differences in the directory structure from XP to Vista of course but if you are listing all directories this would not be an issue.
If you want to use VB code then you would use the Dir$() function recursively or optionally you could use the FSO
There are some folders that will deny access and may throw an error so you have to account for that.
Re: get all directories in all o/s
whole operating system , shared folder / my documents / pictures / music / windows / and system32
i need to first list all directory , second task copy files to were ever i want
Re: get all directories in all o/s
Command Promt..
DIR *.* /S /AD>C:\MYDIRLIST.txt
writes a list of all folders to a text file..
There are ways to Manipulate the list But i forget the syntax. :confused:
OR..
tree /a>c:\DirTree.txt
tree /a /f>c:\TreeWithFile.txt
Re: get all directories in all o/s
You can probably find the code to do what you want in the project here.
Re: get all directories in all o/s
it shows browse for folder , i want to show all list like tht yeh but in listbox something
Re: get all directories in all o/s
Against my better judgement... I'm going to allow myself to get sucked into this thread for a moment...
what you're looking for is the Dir() function
I'll leave it to you to figure the details.
-tg
Re: get all directories in all o/s
Re: get all directories in all o/s
Sigh..... so the problem is solved ?
Re: get all directories in all o/s
Quote:
Originally Posted by
ladoo
it shows browse for folder , i want to show all list like tht yeh but in listbox something
You didn't search though the whole code.