Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

msDos cmd through VB.net

Status
Not open for further replies.

Ronze55

MIS
Jul 9, 2004
54
US
Hello everyone,

I would like to send the following cmd through vb.net to msDOS.

ren *in *.txt

I think it should look something like this:

Dim objExec = Shell("C:\Garan>ren *.in *.txt")

I got this off of a message board and I know this is half, if that much, of what i need.

I used to do this with vb6 but have forgotten and know it can be done with vb.net

any feedback is appreciated,
thanks

Ronze
 
i ended up going with this

strNewFile = Mid(e.FullPath, 1, InStr(e.FullPath, ".")) & "txt"
System.IO.File.Copy(e.FullPath, strNewFile)
System.IO.File.Delete(e.FullPath)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top