Jump to content

Recommended Posts

Posted

Ive just created my new domain from scratch (2008R2) as the old network name was the old school name. I have created all the new student accounts using our new naming convention for students, old one was the first part of their lea email address. So for Tom Smith it would be something like smitht012 for the old and the new ones are intake year followed by name like 12smitht. I can migrate their home areas over but obviously the names will be wrong for using the %USERNAME% when mapping home drives and permissions etc.

 

Is there an easy way that i can rename the old folders to new folders? Or will i have to create new folders and manually copy over data!!

 

I have a spreadsheet with Student name, old username, new username as the 3 columns if that makes it easier for scripting it somehow!!

 

Have looked on google but most bulk renamers are for files and the 2 i tried for folders didnt work!

 

Does someone have a script that i can have to do the above i would be most grateful :)

Posted

If you the old foldername and the new foldername all you should need is to (in the folder they are in) run the rename command from a prompt.

 

rename OLDFOLDERNAME *space* NEWFOLDERNAME

 

i.e.

rename test1 1test

would take the folder 'test1' and rename it '1test'

 

now, with excel if you have 3 columns. ColA with 'rename' ColB with oldfoldername and ColC with newfoldername and save it as a csv file.

Once as a CSV file, open it in notepad or similar (i use notepad++) and replace all the commas with a space using find and replace.

 

Save as a batch file and run.

 

I use this method a lot for bulk commands, creating folders, security permissions, AD stuff etc.

 

 

Hope this makes sense.

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...