TROUBLESHOOTING: File or Folder Uploads Monitor (1.0) - superseded
Log In or Register to download the BES file, and more.

0 Votes

Versioning - This is an older version.

1TROUBLESHOOTING: File or Folder Uploads Monitor (1.0)11/17/2022 8:44:47 AM
2TROUBLESHOOTING: File or Folder Uploads Monitor (1.0)11/17/2022 1:17:18 PM
3TROUBLESHOOTING: File or Folder Uploads Monitor (1.0)11/17/2022 1:17:53 PM
4TROUBLESHOOTING: File or Folder Uploads Monitor (1.0)11/17/2022 1:32:14 PM

Description

TROUBLESHOOTING: File or Folder Uploads Monitor (1.0)

Description

This will become relevant when there are files or folder present in the UploadManagerData folder as a result of being uploaded by the "TROUBLESHOOTING: Upload a Specified File or Folder" task.  When actioned the task will move the file(s) to a more convenient location.  See the action parameters for more info.

Deployment Notes

  • Run this only when needed.
  • Unless modified, this task will only be relevant for uploads with the keyword "avpfileupload_" in the file name.
  • Set the destination folder for the file moves by editing the "rootFolder" parameter in the actionscript.
  • The task will backup any files/folders that exist.
Supported Platforms

Windows root servers

Version and Release Info

1.0.0 -- Initial Version


Property Details

ID26975
StatusBeta - Preliminary testing ready for more
TitleTROUBLESHOOTING: File or Folder Uploads Monitor (1.0)
DomainBESC
CategoryBigFix AVP
Download Size0
SourceInternal
Source Release Date8/17/2022 12:00:00 AM
KeywordsTroubleshooting Uploads
Is TaskTrue
Added by on 11/17/2022 1:17:53 PM
Last Modified by on 11/17/2022 1:17:53 PM
Counters 1606 Views / 0 Downloads
User Rating 1 star 2 star 3 star 4 star 5 star * Average over 0 ratings. ** Log In or Register to add your rating.

Relevance

Used in 4 fixlets   * Results in a true/false
Show indented relevance
/* IS A ROOT SERVER */ exists main gather service and not exists relay service
Used in 4 fixlets   * Session Relevance
Show indented relevance
/* FILES WITH THE APPROPRIATE NAMING CONVENTION EXIST IN THE UPLOAD MANAGER FOLDER */ exists (names of it) whose (it as lowercase contains "avpfileupload_") of descendants of folder (concatenation "" of name of drive of regapp "besadmin.exe" & "\Program Files (x86)\BigFix Enterprise\BES Server\UploadManagerData\BufferDir\sha1\")

Actions

Action 1 (default)

Action Link Click here to deploy this action.
Script Type BigFix Action Script
//* ====================================================================================================>
//*
//* DESCRIPTION AND NOTES
//*
//* - This task will move the uploaded files/folders to the location specified in
//* parameter "rootFolder" below.
//*
//* ====================================================================================================>


//* ====================================================================================================>
//*
//* SET SOME PARAMETERS
//*
//* - These parameters can be used to control the location of the files
//*
//* ====================================================================================================>

parameter "driveLetter"="{name of drive of regapp "besadmin.exe"}"
parameter "rootFolder"="{parameter "driveLetter" & "\Uploaded_Files"}"
parameter "uploadsFolder"="{parameter "driveLetter" & "\Program Files (x86)\BigFix Enterprise\BES Server\UploadManagerData\BufferDir\sha1"}"
parameter "backupFolder"="{parameter "rootFolder" & "\Backup"}"

// BACKUP EXISTING FILES, IF PRESENT.
if {exists folder (parameter "rootFolder")}
waithidden cmd.exe /C mkdir "{parameter "backupFolder"}"
waithidden cmd.exe /C xcopy /Y /I "{parameter "rootFolder"}\*.*" "{parameter "backupFolder"}"

// CREATE BASE DIRECTORY STRUCTURE
waithidden cmd.exe /c mkdir "{parameter "rootFolder"}"

// FIND ANY UPLOADED FILES OR FOLDERS IN THE UPLOAD MANAGER DATA FOLDER AND MOVE THEM TO THE SPECIFIED FOLDER
// NOTE: THE UPLOAD TASK NAMED THE FILES "AVPFileUpload" AND THAT IS THE KEYWORD WE WILL LOOK FOR.
// IF THAT KEYWORD IS CHANGED IN THE UPLOAD TASK THEN CHANGE IT HERE AS WELL
delete __createfile
delete move_files.bat

createfile until _END_
cd {parameter "uploadsFolder"}
for /r %%g in (AVPFileUpload_*.*) do (
move /y "%%g" {parameter "rootFolder"}
)
_END_

move __createfile move_files.bat
waithidden cmd.exe /C move_files.bat
Success Criteria

This action will be considered successful when the applicability relevance evaluates to false.


Sharing

Social Media:
Share this page on Yammer

Comments

Log In or Register to leave comments!
dmccalla -
Original had some missing CLI parameters for xcopy (/I /Y) for backing up existing files.