Link to home
Start Free TrialLog in
Avatar of Victor Kimura
Victor KimuraFlag for Canada

asked on

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<><
ASKER CERTIFIED SOLUTION
Avatar of Victor Kimura
Victor Kimura
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Victor Kimura

ASKER

If someone figures out how to do a SVN commit using Powershell can you post please. :)