2
Answers

Rename file extensions in a unknown directory using c#

Mohan D

Mohan D

10y
868
1

I'm writing a code in C# and this is what i want to do:

  I want to change the extension of a file from ".txt" to ".jpg" . Bu this "txt" can be in any directory (so its a unknown directory). This it he path "C:\Users\username\Desktop\Convert" . So inside the convert folder there will be many other folders inside which there will be a ".txt" file (only one "txt" file will exist.). So the code should automatically change the extension of ".txt" file to ".jpg" . Please guide me
Answers (2)
1
Vinay Singh

Vinay Singh

NA 5.9k 126.1k 8y
Hi check the link
http://www.aspsnippets.com/Articles/Create-and-Drop-SQL-Server-Table-programmatically-using-ADONet-C-and-VBNet.aspx
For insert record in table
http://www.aspsnippets.com/Articles/Using-SqlBulkCopy-to-import-Excel-SpreadSheet-data-into-SQL-Server-in-ASPNet-using-C-and-VBNet.aspx
Accepted
0
Vishal Jadav

Vishal Jadav

NA 1.7k 58k 8y
Hi,
Its just the idea, try to use the import functionality of SQL server.
Hope it helps.
Thanks.