Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to write or store a windows folder name in a variable

Status
Not open for further replies.

alberto1974

Technical User
Jul 20, 2004
10
US
Hi all, well, Iam trying to write a script for read all my folders, subfolders and files names of my hard drive,and create a structured HTML sheet similar to a dos "tree >> xfile.doc" command, but with hyperlinks, but I have a problem I only can store file names, but I can't find the way to store or write folder names.
Could anybody help me please???.
Thanks.
 
Well I don't know what is the aspect command to read folder name and pass it to a string varible, like for the file names findfirst and findnext
I wanna create a html sheet that contains hyperlinks to
xfoldernames, not only to filenames,
I wanna that my script first scan root "c:\" search for xfilenames and store with path to any varible xfilename[], and at same time converting to hyperlinks and writing in html sheet, after that if the script found xfoldernames at "c:\" jump to first foldername and do the same process looking for all filenames and subfolders in that folder and and storing to variables with its entire path.After that jump to the next folder in "C:\" and repeat the process.
The problem that I have, is how search for folder names and store to variables, with findfisrt and findnext I can find only filesnames, that is what I think, but maybe Iam not using correct command to find folder names.
Thank You and I hope You can understand my idea.

 
You can use the findfirst command to search for directories as well by using findfirst "*.*" "D" for example. The "D" tells ASPECT to only search for directories, so you could use findfirst "c:\*.*" "D" with findnext to determine all of the directories in the root of C:

 
Iam sorry man, I have just realized the options for findfirst command.I spent 2 days looking for how to find for directories, and I not even read the help of the command findfirst.
Thank You
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top