From 45551cd1b0d1608ad339cd9445be9138edd5706a Mon Sep 17 00:00:00 2001 From: infeeeee Date: Mon, 26 Nov 2018 21:47:57 +0100 Subject: [PATCH] Added existing scripts --- RevitFolderCleaner.bat | 18 +++++++++++ backupRvt.bat | 24 ++++++++++++++ cleanMacFiles.bat | 8 +++++ exobim-revitServerInstaller.bat | 56 +++++++++++++++++++++++++++++++++ readme.txt | 17 ++++++++++ 5 files changed, 123 insertions(+) create mode 100644 RevitFolderCleaner.bat create mode 100644 backupRvt.bat create mode 100644 cleanMacFiles.bat create mode 100644 exobim-revitServerInstaller.bat create mode 100644 readme.txt diff --git a/RevitFolderCleaner.bat b/RevitFolderCleaner.bat new file mode 100644 index 0000000..0c143ca --- /dev/null +++ b/RevitFolderCleaner.bat @@ -0,0 +1,18 @@ +@echo off +REM Version: 1.1 +REM Move revit backup files to the specified folder +REM Usage information: see readme.txt +REM Created by Peter Gyetvai: gyetpet@gmail.com + +chcp 1250 +SET FOLDER=D:\Backup\Revit\ +for /R "%~dp0" %%f in (*.00*.rfa) do ( +move "%%f" "%FOLDER%" +echo. +echo:%%f +) +for /R "%~dp0" %%f in (*.00*.rvt) do ( +move "%%f" "%FOLDER%" +echo. +echo:%%f +) \ No newline at end of file diff --git a/backupRvt.bat b/backupRvt.bat new file mode 100644 index 0000000..2489041 --- /dev/null +++ b/backupRvt.bat @@ -0,0 +1,24 @@ +@echo off +REM Version: 1.1 +REM Backup all revit files for Exobim folder structure. +REM Usage information: see readme.txt +REM Created by Peter Gyetvai: gyetpet@gmail.com + +cd %~dp0 +cd .. +cd .. +if not exist ".\06 - Backup" mkdir "06 - Backup" +cd .\06 - Backup + +for /f "delims=" %%a in ('wmic OS Get localdatetime ^| find "."') do set dt=%%a +set dt=%dt:~0,8% +md .\%dt%-rvtFiles +cd .\%dt%-rvtFiles + +for /R "%~dp0" %%f in (*.rvt) do ( +copy "%%f" "%cd%" +echo. +echo:%%f +) + +cd %~dp0 \ No newline at end of file diff --git a/cleanMacFiles.bat b/cleanMacFiles.bat new file mode 100644 index 0000000..fb3f8c5 --- /dev/null +++ b/cleanMacFiles.bat @@ -0,0 +1,8 @@ +@echo off +REM Version: 1.1 +REM Remove hidden mac files from subfolders +REM Usage information: see readme.txt +REM Created by Peter Gyetvai: gyetpet@gmail.com with the help of the internet + +cd %~dp0 +del /s /q /f /a ._* diff --git a/exobim-revitServerInstaller.bat b/exobim-revitServerInstaller.bat new file mode 100644 index 0000000..e5a601b --- /dev/null +++ b/exobim-revitServerInstaller.bat @@ -0,0 +1,56 @@ +@echo off +REM Version: 1.0 +REM Revit server installer script for exobim +REM Usage run this after download +REM Created by Peter Gyetvai: gyetpet@gmail.com with the help of the internet + +SET SERVERPATH=exobim.asuscomm.com + +SET FOLDER2018=%programdata%\Autodesk\Revit Server 2018 +SET FOLDER2019=%programdata%\Autodesk\Revit Server 2019 +SET INI2018=%FOLDER2018%\Config\RSN.ini +SET INI2019=%FOLDER2019%\Config\RSN.ini + +echo You have to restart Revit after running this script, or modifying your RSN.ini file +echo This script will add the following path to your RSN.ini: +echo %SERVERPATH% +echo --- + +if exist "%FOLDER2018%" ( + echo Revit 2018 installed + if exist "%INI2018%" ( + echo RSN.ini exists, skipping + echo Modify your RSN.ini here: + echo "%INI2018%" + SET OK2018=no + ) else ( + echo Creating RSN.ini + echo %SERVERPATH% > "%INI2018%" + SET OK2018=ok + ) +) else ( + echo Revit 2018 not installed, skipping +) +echo --- + +if exist "%FOLDER2019%" ( + echo Revit 2019 installed + if exist "%INI2019%" ( + echo RSN.ini exists, skipping + echo Modify your RSN.ini here: + echo "%INI2019%" + SET OK2019=no + ) else ( + echo Creating RSN.ini + echo %SERVERPATH% > "%INI2019%" + SET OK2019=pl + ) +) else ( + echo Revit 2019 not installed, skipping +) +echo --- +if %OK2018% EQU ok echo Successfully set up Revit 2018 +if %OK2019% EQU ok echo Successfully set up Revit 2019 +echo --- + +pause \ No newline at end of file diff --git a/readme.txt b/readme.txt new file mode 100644 index 0000000..b1edf9b --- /dev/null +++ b/readme.txt @@ -0,0 +1,17 @@ +How to use these files? + +This files only work from the PCs in the office. NOT WORKING THROUGH FILEZILLA! However you can download them and use on your own PC. +They only work on Windows. + +- backupRvt.bat +Copy this file to the BIM modeling folder. +If you run it, it will create a folder in the backup folder of the project. The name of this folder will be the current date. +It COPIES all of the rvt files to there. No other files touched. + +- cleanMacFiles.bat +Copy to any folder, it will DELETE the macintosh junk (the ._ files) from every subfolder + +- RevitFolderCleaner.bat +Copy this script to any folder. It will MOVE all revit backup file from all subfolders. +Before running you have to edit the file(rightclick -> edit). On the third line change the path to where you want to MOVE the files: SET FOLDER=D:\Backup\Revit\ +After you set the folder run the script \ No newline at end of file