Renaming a file
Posted on 2013-01-10
I have text files in C:\folder\ListofSchools. These textfiles uses their IDs as file names.
However, in the database, their codeDesc are..
Id like to rename the ids or replace it with their codeDesc ..
I was thinking of creating a stored procedure that will extract the name from Id such as
Select codeDesc from tblSchool where id = the file name that is listed in the folder..
What will be the code to loop to the folder?
What code to rename the id with the code desc?
Has anyone done this directory or file processing?
I appreciate if you can send me code examples how it is done?