# VB execute .bat inside subfolder to rename files

• ### Question

• I want to execute in VB an .bat inside a subfolder to rename some files.The folder is dinamyc and the name of the subfolder is static.

 path = System.IO.Path.GetDirectoryName( _
System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)
Dim psi As New ProcessStartInfo(path & "\subfolder\kappa.bat")

this will generate an error when I start.exe and also this doesn't do anything

 Shell(CreateObject("Wscript.Shell").CurrentDirectory & "\subfolder\" & "kappa.bat", AppWinStyle.Hide)

so

path

is not what I need but I didn't find anything related to my question

Saturday, August 27, 2016 3:59 PM

### All replies

• @Moderators: This should be moved to more appropriate forum.

Best Regards,