FTP CMD-scripts for scriptwriters/devs
#1
Question 
when developing and testing scripts i needed a quick way to ftp my script onto my xbox and the xbmc.log back to my pc.

here are some command (not python) scripts to make this a little bit easier.
maybe someone else will find them also useful:

the first is a ftp.exe launcher (ftplaunch.cmd).
you can pass it a ftp subcommands script which it will execute

Quote:@echo off
rem ===================================
rem simple ftp launcher script by bernd
rem ===================================
rem change this to the ip of your xbox
set xboxip=192.168.1.11

if $%1$==$$ goto usage

ftp -s:%1 -i %xboxip%
goto endbatch

:usage
echo you need to pass a ftp command script

:endbatch
set xboxip=

pause

here is a subcommandscript to download the logfiles to c:\
the first two lines are the username and pw
then it uses cd to change the remote dir (on the xbox) and lcd to channge the local dir (on your pc)
switches to binary mode (not really neccessary)
transfers the two logfiles
Quote:xbox
xbox
cd f:\apps\xbmc
lcd c:\
binary
recv xbmc.log xbmc.log
recv xbmc.old.log xbmc.old.log
quit

this is a subcommand script that uploads myscript.py and all png files matching myscript*.png
Quote:xbox
xbox
cd f:\apps\xbmc\scripts
lcd "c:\scripts"
binary
put myscript.py
mput myscript*.png
quit

i have the ftplaunch.cmd placed on my desktop, so i can simply drag any ftpsubcommand script and drop it onto ftplaunch.cmd

if you like you can also create another cmd script and and call ftplaunch.cmd directly so you can perform any ftp action with one click or keypress if you assign a keyboardshortcut to it.

for more help on the ftp subcommands see here

have fun

bernd
Reply

Logout Mark Read Team Forum Stats Members Help
FTP CMD-scripts for scriptwriters/devs0