Specify filename via command line

Didn't want to res a dead thread, but this is basically the same question as:
https://forum.red-gate.com/discussion/78287/command-line-specify-filename?

I've got SQL Doc generating via command line through calls from powershell, but I can't find a switch that allows you to specify the filename. Is there a way to do this or is it only an option from the GUI?

Thanks!
Tagged:

Best Answer

  • Rob CRob C Posts: 419 Gold 2
    Ah, sorry about this. I've put a note about this on our system as a feature request. Sorry I can't be of more help.

    In the mean time, would it be possible to find the newest file with the docx extension and rename it programatically? It's not ideal but it might be a workaround.
    Software Engineer
    Redgate Software

Answers

  • Hi @RandomUser,

    Even in the GUI you can only specify the file location, not the filename. You can do the same in the command line by using the /outputfolder switch..

    In case this is useful, you can get the full command line documentation by running sqldoc.exe /help /verbose /html > filename.html to generate an html file that details every command line switch.

    I hope this helps!
    Software Engineer
    Redgate Software
  • RandomUserRandomUser Posts: 5 New member
    I'm sorry, I should have specified that I'm attempting to generate a .docx file, in which case the GUI does allow you to specify your filename:
    l4abn1yg3p5p.jpg

    I had looked through the documentation, but assumed I had missed something as it's definitely an option from the GUI. I guess it's not supported.

  • You can still save the project file in the GUI and then reference that project file when calling the command line. See this documentation page for info on how to do this.
    Software Engineer
    Redgate Software
  • RandomUserRandomUser Posts: 5 New member
    Yeah, I looked at that, but it's essentially the same issue I have without using a project file. Without a project file, the filename prefix is auto-generated. With a project file, the filename prefix is set by me. But in neither case is it dynamically changeable through command line execution.
Sign In or Register to comment.