Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
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!

  • Administrator
  • 26,019 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!

  • Administrator
  • 26,019 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