Results 1 to 8 of 8

Thread: how do I run a batch file with a command variable?

  1. #1
    Newbie
    Join Date
    Jul 2010
    Location
    Bodø¸, Norway, Norway
    Posts
    33

    how do I run a batch file with a command variable?

    I just cant figure it out. I've made a simple batch file which connects to a ftp-server and uploads a given file. I've made a button in RR which runs the batch file with the variable PICTURE after. ANd I've made a label in RR to see that the PICTURE variable contained a useful path and filename.

    cmd:
    "RUN;C:\fennec\up.bat|$PICTURE$"

    isn't that supposed to work? it launches the batch file but I cant get any output from RR on the variable.

    so what I want is
    c:\fennec\up.bat d:\images\test.jpg

    and what i get is
    c:\fennec\up.bat

    halp?

  2. #2
    Newbie
    Join Date
    Jul 2010
    Location
    Bodø¸, Norway, Norway
    Posts
    33
    btw: ive made absolutely sure the batch file works when running it via cmd and supplying it with the image path/file.

    batch for referance
    @echo off
    set ftp_user=myuser
    set ftp_pass=mypass
    set ftp_server=mysite
    set ftp_upload_path=mypath
    echo user %ftp_user%> temp_info.dat
    echo %ftp_pass%>> temp_info.dat
    echo cd %ftp_upload_path%>>temp_info.dat
    echo bin>> temp_info.dat
    echo put %1>> temp_info.dat
    echo quit>> temp_info.dat
    ftp -n -s:temp_info.dat %ftp_server%
    del temp_info.dat
    exit

  3. #3
    MGD
    MGD is offline
    FLAC
    Auto Apps:loading...
    MGD's Avatar
    Join Date
    Feb 2005
    Location
    Los Angeles
    Posts
    1,756
    Where do you SET the variable?
    You need to set it first to have it available.
    "SETVAR;PICTURE;d:\images\test.jpg||C:\fennec\up.b at|$PICTURE$"
    After you push this button, you should see the variable in a label with this code.
    "=$PICTURE$"

  4. #4
    Newbie
    Join Date
    Jul 2010
    Location
    Bodø¸, Norway, Norway
    Posts
    33
    I just used this info from skin commands.txt
    "PICTURE" - Shows the full path to the current picture of the picture viewer

    when I set up a label with cmd "PICTURE" it has no trouble showing the path to the selected picture. I just thought it should work with a button as well.

  5. #5

  6. #6
    Newbie
    Join Date
    Jul 2010
    Location
    Bodø¸, Norway, Norway
    Posts
    33
    *facepalm*

    Thanks

  7. #7
    RoadRunner Mastermind
    Auto Apps:loading...
    guino's Avatar
    Join Date
    Nov 2004
    Location
    Toronto, Canada
    Posts
    9,817
    Code:
    "SETVARBYCODE;PICTURE;PICTURE||RUN;C:\fennec\up.bat|$PICTURE$"
    should work.
    Ride Runner RR's Myspace

    "Being happy is not about having what you want, it's about wanting what you have."
    "The best things in life are always free - but that doesn't mean money can't buy you good things."

  8. #8
    Newbie
    Join Date
    Jul 2010
    Location
    Bodø¸, Norway, Norway
    Posts
    33
    Yeah, I just didn't know you had to do the set picture from picture thingie.

    Works now, thanks to all

Similar Threads

  1. GoogleEarth GPSR Tracking
    By briefnotion in forum GPS
    Replies: 117
    Last Post: 09-11-2007, 07:32 PM
  2. batch file programming LCD's
    By mosh in forum LCD/Display
    Replies: 6
    Last Post: 05-19-2002, 12:55 AM
  3. Program or batch file to control DTR on a serial port
    By percyt2k in forum Software & Software Development
    Replies: 7
    Last Post: 12-17-2001, 03:41 PM
  4. batch file playlist creation size limit?
    By AndyM in forum Software & Software Development
    Replies: 6
    Last Post: 08-08-2001, 12:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •