how to use powershell to do a SVN subversion commit on a file or directory recursively with Windows Task Scheduler

Hi,

I managed to run a very simple powershell commands using the the Windows Task Scheduler. This works:

$Today = [string]::Format( "{0:dd-MM-yyyy-hh-mm-ss}", [datetime]::Now.Date )
$Today | Out-File F:\Downloads\Computing\Development\NotesPlus_v03\trunk\Computer\Windows\BatchFiles\testpowershell.txt

Open in new window


But when I try to do a commit using the svn command it doesn't work:

$SVNExe = "C:\Program Files\SlikSvn\bin\svn.exe"
$SVNURL = "F:\Downloads\Computing\Development\NotesPlus_v03\trunk\2015.txt"
& $SVNExe commit $SVNURL -m 'powershell task scheduled"

Open in new window


I'm a total newbie to powershell.

BTW, I tried using some batch commands and can do some basic xcopy with a testxcopy.bat file from the Windows Tasks Scheduler but when I try this:

svn.exe commit "F:\Downloads\Computing\Development\NotesPlus_v03\trunk\" -m "command line task scheduled" --no-auth-cache --non-interactive /closeonend:2

Open in new window


It doesn't work either. Been searching on forums and stackexchange but can't get anything to work. Has anyone done this successfully. I just have the SVN server on my windows 7 local dev machine. BTW, I ran this:

svn.exe commit "F:\Downloads\Computing\Development\NotesPlus_v03\trunk\" -m "command line task scheduled"

and it works form the command line. I tried the batch commands without the --no-auth-cache and --non-interactive switches too.

Much thanks and blessings<><
Victor KimuraSEO, Web DeveloperAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Victor KimuraSEO, Web DeveloperAuthor Commented:
I got this batch file to work:

REM 2015commit.bat
svn commit "F:\Downloads\Computing\Development\NotesPlus_v03\trunk\2015.txt" -m "command line task scheduled" REM works!
svn commit "F:\Downloads\Computing\Development\NotesPlus_v03\trunk\test-061315-0852.txt" -m "command line task scheduled"

Open in new window


I don't know how to run the Windows Task Schedule with the SVN commit using Powershell yet though.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Victor KimuraSEO, Web DeveloperAuthor Commented:
If someone figures out how to do a SVN commit using Powershell can you post please. :)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Powershell

From novice to tech pro — start learning today.