Tuesday, June 26, 2018

NavisWorks nightly file creation list append list in batch file


C:\Program Files\Autodesk\Navisworks Simulate 2016\FiletoolsTaskRunner.exe you could manually make this batch as files change.
Batch file create a list of all the DWG files in a folder and all the subfolders.
Let me know if you have a better way.

NavisWorks nightly file creation list

1. Make a list of dwg files on folders and subfolders.


FOLDER1.BAT
REM Create File list. /s subdir, /b no header, \*.dwg to folder path,  >> append
dir "C:\1\*.dwg" /s /b >> "C:\List2.txt"

FOLDER2.BAT
dir "C:\2\*.dwg" /s /b >> "C:\List2.txt"

2. Create second list with file names like OLD and CORRUPT removed

REMOVE_FILE_NAMES.BAT
REM Delete lines with certain strings, /v prints only lines that do not contain a match., /I ignore case.
findstr /V /I "RECOVER VOID OLD CLASH CORRUPT" "C:\List2.txt" > "C:\List.txt"

3. Delete and Append each folder to new list every night.

CALL.BAT
Del "Path\List2.txt"
Call "Path\FOLDER1.BAT"
Call "path\FOLDER2.BAT"

4. Use Task Scheduler to run CALL.BAT then 10 min later run REMOVE_FILES.BAT then 10 min later CALL.BAT

5. Navisworks batch
C:\Program Files\Autodesk\Navisworks Simulate 2016\FiletoolsTaskRunner.exe

C:\Program Files\Autodesk\Navisworks Simulate 2016\FiletoolsTaskRunner.exe /i "C:\List.txt" /osd /log "C:\NAV.log" /appendlog /version 2014

No comments: