+ Reply to Thread
Results 1 to 3 of 3

VB execute .bat inside subfolder to rename files

  1. #1
    Registered User
    Join Date
    08-27-2016
    Location
    ddd
    MS-Off Ver
    ddd
    Posts
    2

    VB execute .bat inside subfolder to rename files

    I want to execute in VBA 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
    Last edited by vladtester; 08-27-2016 at 12:30 PM.

  2. #2
    Forum Contributor kalbasiatka's Avatar
    Join Date
    02-27-2016
    Location
    Brest, Belarus
    MS-Off Ver
    2021
    Posts
    224

    Re: VB execute .bat inside subfolder to rename files

    vba not vb!
    To do it for me and help me it is 2 different things!
    Sorry for my english, blame Google translator

  3. #3
    Registered User
    Join Date
    08-27-2016
    Location
    ddd
    MS-Off Ver
    ddd
    Posts
    2

    Re: VB execute .bat inside subfolder to rename files

    Quote Originally Posted by kalbasiatka View Post
    vba not vb!
    Sorry sir,I edited the post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. My File Rename Macro Always Doesn't Rename the Last Three files in the list
    By Enright in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-02-2016, 03:46 PM
  2. Replies: 1
    Last Post: 12-08-2015, 06:37 AM
  3. Replies: 0
    Last Post: 09-18-2015, 03:20 AM
  4. [SOLVED] Macro to open up a .csv file inside each subfolder in a master folder
    By hutch94 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 08-05-2014, 07:24 PM
  5. [SOLVED] Code to create folder and inside subfolder
    By kosherboy in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 03-07-2014, 03:03 PM
  6. Macro to rename photos in a main folder's subfolders to subfolder names
    By Spardante in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-22-2014, 11:41 PM
  7. Files move to a subfolder
    By Jokacave in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 04-22-2010, 02:13 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1