Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

Retrieving folder names?


  • Please log in to reply

#1
BlutoniumBoy

BlutoniumBoy

    Member

  • Member
  • PipPip
  • 19 posts
Hey guys/gals,

I was wondering if anyone could help me figure out a way to create a .csv file of all the folder names on a drive. This is a "Home" drive for our enterprise and has each users folder on it.

What I need to do is generate a listing and input the generated list of JUST folder names, not it's subfolders, into a spread sheet for comparison to the users listed in ADS. I have created the list of enabled users from ADS with the csvde.exe command, now I just need to create the list from our "home" drive.

I am no script writer, so, any help would be of great appreciation.

Thanks!

PS
  • 0

Advertisements


#2
dsenette

dsenette

    Je suis Napoléon!

  • Community Leader
  • 26,047 posts
  • MVP
on the computer housing these files press start > run > type "cmd" (without quotes)
this will bring up the command prompt

type cd <path to the folder that holds the user folders>
(i.e. cd c:\users\)
your prompt should look like
cd c:\users>
type
dir > c:\Folders.txt

now navigate to the c drive and open folders.txt
it will look like this
Directory of U:\

11/10/2006  03:43 PM	<DIR>		  .
11/10/2006  03:43 PM	<DIR>		  ..
06/02/2006  12:20 PM	   855,624,704 aactsrv1.bkf
06/02/2006  12:24 PM	   742,732,800 aactsrv2.bkf
08/03/2005  04:12 PM	<DIR>		  aisin
09/20/2006  01:32 PM		   134,593 apartment.png
05/23/2005  07:16 AM	<DIR>		  archived emails
07/08/2005  08:27 AM			   207 ATT28463 (2).txt
02/15/2006  02:04 PM	<DIR>		  backup
go through and remove all the stuff before the folder names (also anything with <dir> in front of it is a folder...anything else isn't)
now you can save this file as a csv or copy and paste the contents into excell
  • 0

#3
BlutoniumBoy

BlutoniumBoy

    Member

  • Topic Starter
  • Member
  • PipPip
  • 19 posts
Thanks dsenette, however, this is a shared drive on our servers and I don't have direct acces to it. I can't change the drive letter in the shell without it being a local drive. I just get returned to c:.

Now I can get to the drive but can't view the directory listing... weird.

Edited by BlutoniumBoy, 14 December 2006 - 03:25 PM.

  • 0

#4
dsenette

dsenette

    Je suis Napoléon!

  • Community Leader
  • 26,047 posts
  • MVP
try
dir \\<servername>\<foldername\ > c:\folders.txt

such as

dir \\server1\sharedfolder > c:\folders.txt
  • 0

#5
BlutoniumBoy

BlutoniumBoy

    Member

  • Topic Starter
  • Member
  • PipPip
  • 19 posts
Sweet. Thanks!
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP