HTML name

Documents SQL Server 2005 and 2008 databases.

Moderators: JonathanWatts, David Atkinson, Michelle Taylor

HTML name

Postby lkalman@financemgr.com » Fri Nov 02, 2012 4:27 pm

I am creating a interactive HTML document.

Every time I run SQL DOC it creates a new TimeStamp Folder
Such as TFS08-2012-11-01T12-54-34.

We are using source Control and this will treat the folder as a new folder every time.

I am looking to create a folder and keep it the same name and only commit the changes to my repository.

The Images also seem to get recreated. The program should check it certain files exists before recreating them.
lkalman@financemgr.com
 
Posts: 22
Joined: Wed Apr 11, 2012 2:03 pm

Postby Brian Donahue » Fri Nov 02, 2012 5:36 pm

Hello,

I believe un-ticking the "Include time stamp" option on the "Generate Documentation" form is the one that will solve that particular problem.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Postby lkalman@financemgr.com » Fri Nov 02, 2012 5:38 pm

Does this option exists in the command prompt as well.
lkalman@financemgr.com
 
Posts: 22
Joined: Wed Apr 11, 2012 2:03 pm

Postby Brian Donahue » Fri Nov 02, 2012 6:11 pm

The /outputfolder argument is supposed to let you override the output folder. Does that work?
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Postby lkalman@financemgr.com » Fri Nov 02, 2012 8:09 pm

Here is my Script the
/outputfolder places the timestamp folder in the c:\\temp folder instead of the default folder

• "C:\\Program Files\\Red Gate\\SQL Doc 2\\"sqldoc /Project:"c:\\temp\\TFS08.sqldoc" /force /Filetype:html-frames /outputfolder:c:\\temp /out:TFS08.html
lkalman@financemgr.com
 
Posts: 22
Joined: Wed Apr 11, 2012 2:03 pm

Postby Brian Donahue » Mon Nov 05, 2012 10:11 am

Thank you. This is now logged as bug SDOC-1377. I suppose a workaround would be a batch file to rename the folder after it's created.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Workaround is Powershell

Postby jasoncleme » Wed Jan 16, 2013 4:03 pm

Me and my team are using Red-gate's SQLDOC for our DB Docs. We have a built nightly PowerShell that run SQLDOC command line that is running to over the current post SQLDOCs.

The workaround to to have one sub-folder for each server/project.

Code: Select all
<# 
 =====================
 Delete Current SQLDOC
 =====================
#>
$path = '\\\\server\\d$\\PVP\\PVP21\\webcontent\\Powershell\\Database_Documentation\\DBPrime1\\'
Get-ChildItem $path  |
    Sort-Object { $_.Name -as [Version] } |
    Select-Object -Last 1 |
    Remove-Item -recurse
<# 
 ===============
 Create SQLDOC
 ===============
#>
$CMD = 'C:\\Program Files (x86)\\Red Gate\\SQL Doc 2\\sqldoc.exe'
$arg1 = '/project:H:\\My Documents\\SQL Server Management Studio\\Red-Gate\\DBPrime1.sqldoc'
$arg2 = '/filetype:html-frames'
$arg3 = '/force'
$arg4 = '/outputfolder:"\\\\server\\d$\\PVP\\PVP21\\webcontent\\Powershell\\Database_Documentation\\DBPrime1"'
 
& $CMD $arg1 $arg2 $arg3 $arg4

<#
"C:\\Program Files (x86)\\Red Gate\\SQL Doc 2\\sqldoc.exe" /project:"H:\\My Documents\\SQL Server Management Studio\\Red-Gate\\DBPrime1.sqldoc" /filetype:html-frames /force /outputfolder:"\\\\server\\d$\\PVP\\PVP21\\webcontent\\Powershell\\Database_Documentation\\DBPrime1"
#>

<# 
 ===============
 Rename Directory
 ===============
#>
cd \\\\server\\d$\\PVP\\PVP21\\webcontent\\Powershell\\Database_Documentation\\DBPrime1
dir | Where-Object {$_.Name} | Rename-Item -NewName "DBPrime1"
jasoncleme
 
Posts: 3
Joined: Wed Jan 16, 2013 4:00 pm


Return to SQL Doc 2

Who is online

Users browsing this forum: No registered users and 1 guest