I found a lot of stuff online about creating invisible bat files. I came closest to wrapping my mind around this one:
Run a batch file in a completely hidden way
However, in my application, I can't figure out how to get this to work. Here is my current setup that works (with annoying cmd windows popping up all over the place).
I am using the app uTorrent to run a bat file whenever a torrent finishes. Within the app, there is a field to "Run this app when a torrent finishes". I have entered:
C:\scripts\torrentscript.bat "%D" "%N" "%L" "%K" "%F" >> C:\scripts\torrentlog.txt
Can someone hold my hand through setting this up so that the bat runs invisibly? I cant figure out how to pass all the parameters through properly. A huge bonus would be if I could keep the log file working properly as well for debugging.
Thank you so much!!
ETA bat file:
@echo off
title Duplicating a Freshly Downloaded Movie or Show
rem Parameter usage: fromdir torrent-name label kind [filename]
rem corresponds to uTorrents flags: %D %N %L %K %F
echo *********************************************
echo Run on %date% at %time%
set fromdir=%1
set name=%2
set label=%3
set kind=%4
set filename=%5
set savepartition=J:
set moviedir=%savepartition%\"Movies [NOSYNC]"
set showdir=%savepartition%\"TV [NOSYNC]"
rem Only process PTP or BTN Auto torrents
if %label%=="PTP" goto movie
if %label%=="BTN Auto" goto show
GOTO :EOF
:movie
echo ***Movie**********
set todir=%moviedir%
set type="New Movie"
if %kind%=="single" goto single
goto multi
:show
echo ***Show**********
set todir=%showdir%
set type="New TV Show"
if %kind%=="single" goto single
goto multi
:single
echo Single
echo %fromdir%%filename% %todir% /I
xcopy %fromdir%%filename% %todir% /I
goto growler
:multi
echo Multi
echo %fromdir% %todir%\%name% /I
xcopy %fromdir% %todir%\%name% /I
goto growler
:growler
call "C:\Program Files (x86)\Growl for Windows\growlnotify.exe" /a:"uTorrent" /n:"Finished" /t:%type% %name%
echo Processing Complete on %date% at %time%