Rename folders based upon folder list in table with xp_cmdshell
Posted on 2004-09-26
Is there as way usign something like xp_cmdshell where I can take a list of folders in my windoes directory and if they are located within a select statement that I am pulling from a table that contains the folder names, rename the folder?
I have a SQL table with a list of folder names - the folder are named as such -
Each of the folder names is 6 total characters in length and all are prefixed with a "5" - what I need to do is to rename all the folders in a directory, based upon athe list pulling from the select statement and simply rename the coressponding folders by stripping the "5" from teh front - I am severly desperta en need some help - so please, any help would truly save my day!!!!!