I need to run the line below in VBS. It is tricky due to the quotes. I need to run the code and any output send to a log file. This is the A-PDF Renaming software I am using. Thanks for you assistance!
for %i in (D:\Centers\CO022\Test\*.pdf) do ""C:\Program Files (x86)\A-PDF Rename\prncmd.exe"" %i ""[%Content_1% ] %Content_2% (%Content_3%)"" -L""C:\Scripts\1.rul"",""C:\Scripts\2.rul"",""C:\Scripts\3.rul"" > ""C:\Scripts\CO022-RPL-Log.txt
for %i in (D:\Centers\CO022\Test\*.pdf) do ""C:\Program Files (x86)\A-PDF Rename\prncmd.exe"" %i ""[%Content_1% ] %Content_2% (%Content_3%)"" -L""C:\Scripts\1.rul"",""C:\Scripts\2.rul"",""C:\Scripts\3.rul"" > ""C:\Scripts\CO022-RPL-Log.txt
Code:
Dim WshShell, fso, file
Set WshShell = WScript.CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
WshShell.Run("cmd for %i in (D:\Centers\CO022\Test\*.pdf) do ""C:\Program Files (x86)\A-PDF Rename\prncmd.exe"" %i ""[%Content_1% ] %Content_2% (%Content_P3%)"" -L""C:\Scripts\1.rul"",""C:\Scripts\2.rul"",""C:\Scripts\3.rul"" > ""C:\Scripts\CO022-RPL-Log.txt"""),1,false
wscript.quit