Announcement

Collapse
No announcement yet.

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

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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

    Comment


    • #3
      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$"

      Comment


      • #4
        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.

        Comment


        • #6
          *facepalm*

          Thanks

          Comment


          • #7
            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."

            Comment


            • #8
              Yeah, I just didn't know you had to do the set picture from picture thingie.

              Works now, thanks to all

              Comment

              Working...
              X