omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Pythonista script included in Workflow

    Pythonista
    4
    4
    2992
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • JMM
      JMM last edited by

      Hi, I am completely new to Pythonista and can’t find the basic information to start a script that would rename a file and save it.
      This script is then to be run in Workflow. Can anyone give me a hand ? Thanks in advance.

      1 Reply Last reply Reply Quote 0
      • my4paws
        my4paws last edited by

        Hi
        I’m also new to python and reading through the forum here looking for help building my first script. I’ve yet to ask a question here. That no one has given you an answer in 21 days for what is I’m sure pretty basic stuff for most users of this forum doesn’t bode well for us beginners does it. :(
        But anyway... you can achieve your aim within just workflow quite easily with the following sequence of actions.

        Get file
        Set variable
        Save file ( with new name)
        Get variable
        Delete file

        1 Reply Last reply Reply Quote 0
        • shaun-h
          shaun-h last edited by

          I did a quick search on this forum and found this (I haven't tried it) https://forum.omz-software.com/topic/1491/simple-file-rename-script
          Hopefully it points you in the right direction.

          1 Reply Last reply Reply Quote 0
          • enceladus
            enceladus last edited by

            If you delete the following two lines, the script works.

            if DOCUMENTS.startswith("/private"):
                DOCUMENTS = DOCUMENTS[len("/private"):]
            
            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Powered by NodeBB Forums | Contributors