elviscai Posted July 18, 2021 Posted July 18, 2021 I want to start a workflow with a hotkey, then check if the specified filename exists, and create the file if it doesn't exist, and append the content if it does. After reading the help, I feel the "File Utility" is what I want - but I don't know how to pass the filename to it? I hope I can get an example or an answer, thanks!
vitor Posted July 18, 2021 Posted July 18, 2021 Welcome @elviscai, Seems like the Write File Output is what you want instead. Have you considered that one?
elviscai Posted July 18, 2021 Author Posted July 18, 2021 3 hours ago, vitor said: Welcome @elviscai, Seems like the Write File Output is what you want instead. Have you considered that one? I know how to write a file, but want to decide what to write to the file based on whether the file exists or not.
vitor Posted July 18, 2021 Posted July 18, 2021 1 minute ago, elviscai said: but want to decide what to write to the file based on whether the file exists or not. Which you can accomplish with multiple Write File Output. It has a builtin conditional to Skip, Overwrite, or Append depending on if the file exists. What you’re trying to do is an extra step. Either way, for the File Utility you give it the file’s path from the preceding node. If you’re using a Hotkey, set Argument to Text and paste the full file path there. elviscai 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now