On the core server the \ManagementSuite\ldscan\ folder is the location where inventory scan files are uploaded to from your clients.
Upon successful insertion to the database the files are deleted. If there is a failure the scan files will be sorted into ErrorScan, ErrorBigScan, and ErrorTrans. You can cut and paste failed scans back out into the ldscan folder to be re-run.
ErrorScan and ErrorBigScan are pretty common, however if you see an ErrorTrans, you should be calling support. Due to hiccups or bad inventory data being sent to the core these folders can grow to be fairly large over time.
The following is a script that can be used to automatically clean-up the ErrorScan and ErrorBigScan folders for you and log the file count.
REM ldscan folder cleanup REM Author: Peter Massa REM Configuration: REM Enter your ldscan folder location: cd E:\Program Files (x86)\LANDesk\ManagementSuite\ldscan REM Enter the drive location: E: REM Enter a log file location: set tempLog="E:\Program Files (x86)\LANDesk\ManagementSuite\ldscan\logs\ldscan_cleanup.log" REM Do not edit below this line. REM Main cd ErrorScan set I=0 REM view all files, EXCEPT directories. FOR /f "tokens=*" %%P IN ('dir /A-d /b') do (call :showfiles "%%P") FOR %%A IN (*.*) DO DEL %%A cd >> %tempLog% echo %date% %time% >> %tempLog% echo Filecount deleted: %I% >> %tempLog% echo. >> %tempLog% cd ../ErrorBigScan set I=0 REM view all files, EXCEPT directories. FOR /f "tokens=*" %%P IN ('dir /A-d /b') do (call :showfiles "%%P") FOR %%A IN (*.*) DO DEL %%A cd >> %tempLog% echo %date% %time% >> %tempLog% echo Filecount deleted: %I% >> %tempLog% echo. >> %tempLog% REM Functions :showfiles echo %1 set /a I+=1 goto :eof
Create a “logs” folder with-in your \ldscan folder and place this script as a .bat with in it. Then create a scheduled task to run every day, week, or month that executes this script.
*Note – be sure to change the configuration portions at the start of the script.