Version: 1.1
Last Updated: October 2025
FileLabeler is a Windows application that allows you to apply Microsoft Purview sensitivity labels to multiple files simultaneously. It preserves original file dates and provides an intuitive interface for bulk labeling operations.
Before using FileLabeler, ensure you have:
- ✅ FileLabeler installed (see Installation Guide)
- ✅ Labels configured in
labels_config.json(see Configuration Guide) - ✅ Microsoft Purview Information Protection client installed
- ✅ Permission to apply sensitivity labels to files
Method 1: Double-click the executable
FileLabeler.exe
Method 2: Run the PowerShell script
.\FileLabeler.ps1The application will:
- Check for required modules
- Load your label configuration
- Initialize the user interface
You have three methods to select files:
- Click "Select files..." button
- Navigate to your files
- Select one or multiple files (Ctrl+Click or Shift+Click)
- Click Open
Supported file types:
- Word documents:
.docx,.doc - Excel workbooks:
.xlsx,.xls - PowerPoint presentations:
.pptx,.ppt - PDF files:
.pdf
- Click "Select folder..." button
- Navigate to the desired folder
- Check "Include subfolders" if you want recursive scanning
- Click Select Folder
All supported files in the folder (and subfolders if checked) will be added to the list.
- Open Windows Explorer
- Select files and/or folders
- Drag them to the FileLabeler window
- Drop them on either the main window or the file list
Visual feedback: The application shows a light blue tint during the drag operation.
The file list shows:
- File name with path
- Current label in brackets (e.g.,
[Confidential]) - File count below the list (e.g., "15 files selected")
Possible label statuses:
[Confidential]- File has this label[No label]- File has no sensitivity label[Unknown label (protected)]- File has encrypted label not in your configuration[Error retrieving]- Could not read file label
- Click one of the label buttons
- Selected label highlights in blue
- Only one label can be selected at a time
The labels shown come from your labels_config.json configuration.
-
Click "Apply label (preserve dates)" button
-
Smart Preview Dialog appears:
- Shows categorized changes:
- New: File had no label
- Upgrade: Moving to higher sensitivity
- Downgrade: Moving to lower sensitivity (requires justification)
- Same: Same label, different properties
- Unchanged: Identical label
- Shows warnings if applicable:
- 🔴 Mass downgrade (>50% of files)
- 🟠 Large batch (>50 files)
- 🟡 No changes detected
- 🔵 Protection required
- 🟣 Mixed changes
- Option: "Skip unchanged files" for better performance
- Click "Continue" to proceed or "Cancel" to stop
- Shows categorized changes:
-
If downgrade detected:
- Justification dialog appears
- Enter reason for downgrade
- Default: "Changed via bulk labeling"
- Click OK to continue or Cancel to stop
-
If label requires protection:
- Protection dialog appears with options:
- Viewer - View only: Read-only access
- Reviewer - View, edit: Can view and comment
- Co-Author - View, edit, copy and print: Full editing
- Co-Owner - All permissions: Full control including changing permissions
- Owner only (default): Only you
- Specify users (if not "Owner only"):
- Enter email addresses, comma-separated
- Example:
user1@domain.com, user2@domain.com
- Expiration date (optional):
- Check "This document expires:"
- Select date
- Click OK to apply or Cancel to skip
- Protection dialog appears with options:
-
Progress bar shows:
- Current operation
- Percentage complete
- Time estimate
- Async operations for ≥30 files (faster, responsive UI)
-
Results message displays:
- Number of successful operations
- Number of failed operations
Statistics Dashboard automatically appears:
- Detailed breakdown by change type
- Time elapsed (precise timing)
- Success/failure counts with color coding
- Clickable log file link
- "Export to CSV" button
Actions:
-
Export to CSV:
- Click "Export to CSV"
- Choose save location
- CSV includes:
- Summary section
- Per-file details: FilePath, OriginalLabel, NewLabel, ChangeType, Status, Timestamp, Message
- UTF-8 encoding for international characters
-
View Log:
- Click "View log"
- Opens latest log file in Notepad
- Log location:
Documents\FileLabeler_Logs\ - File format:
FileLabeler_Log_yyyyMMdd_HHmmss.txt
-
Clear Selection (optional):
- Click "Clear selection" to remove all files
- Start fresh with new file selection
Current label display:
- Shows current label next to each file
- Auto-refreshes after applying labels
- 60-100x faster than rescanning (inline cache updates)
Label status indicators:
- Green text: Successfully labeled
- Red text: Error occurred
- Gray text: Skipped (unchanged)
Automatic resizing:
- File list adjusts between 3-10 rows based on file count
- Form height adapts automatically
- Smooth transitions when files are added/removed
Benefits:
- Optimal screen space usage
- No scrolling for small lists
- Compact view for large lists
Recursive scanning:
- Check "Include subfolders" to scan entire folder tree
- Uncheck to scan only the selected folder
- Setting is remembered for drag-and-drop operations
Performance:
- Async scanning for large folders (responsive UI)
- Duplicate prevention
- Progress shown in real-time
Supports:
- Individual files
- Multiple files
- Folders
- Mixed files and folders
Visual feedback:
- Light blue tint during drag
- Resets on drag leave
- Indicates drop is accepted
Respects:
- "Include subfolders" checkbox setting
- File type filtering
- Duplicate prevention
Change categorization:
- New (green): Files getting their first label
- Upgrade (blue): Moving to higher sensitivity
- Downgrade (orange): Moving to lower sensitivity (requires justification)
- Same (yellow): Same label, different properties
- Unchanged (gray): Identical label (can be skipped)
Warning system:
- Mass downgrade detection (>50%)
- Large batch warning (>50 files)
- No changes detected
- Protection requirements
- Mixed changes (upgrades + downgrades)
Optimization:
- "Skip unchanged files" option improves performance
- Reduces unnecessary API calls
Comprehensive results:
- Detailed breakdown by change type
- Precise timing with Stopwatch
- Success/failure counts
- Color-coded statistics
- Clickable log file link
CSV export:
- Complete operation log
- All file details
- UTF-8 encoding
- Ready for analysis in Excel
Responsive UI:
- No freezing with large file sets (500+ files tested)
- Progress updates in real-time
- Form remains movable and interactive
- Maintains <100ms UI update cycles
Smart thresholds:
- Folder scan: Always async (any count)
- Label retrieval: >50 files
- Batch apply: ≥30 files
- Automatically selects sync/async based on file count
Performance:
- 4x faster with parallelism (label retrieval)
- Uses 1-4 background threads
- Thread-safe operations
Labels with RequiresProtection: true:
- Select files and protected label
- Click "Apply label"
- Protection dialog appears
- Choose permission level
- Add users (or select "Owner only")
- Set expiration date (optional)
- Click OK
Permission levels explained:
- Viewer: Users can only view, cannot edit or print
- Reviewer: Users can view and add comments
- Co-Author: Users can view, edit, copy, and print
- Co-Owner: Users have all permissions including changing access
- Owner only: No sharing, only you have access
Automatic detection:
- FileLabeler detects when you're applying a lower-ranked label
- Rank is defined in
labels_config.json(0 = lowest, higher numbers = higher sensitivity)
Justification process:
- Select files with higher-ranked labels
- Select lower-ranked label
- Click "Apply label"
- Summary shows downgrades
- Click "Continue"
- Justification dialog appears
- Enter reason (required by Microsoft Purview policy)
- Click OK
Default justification:
Changed via bulk labeling
You can customize this or enter a specific reason.
For 100+ files:
-
Check system resources:
- Close unnecessary applications
- Ensure sufficient RAM (8GB+ recommended)
- Stable network connection if using network files
-
Use async operations:
- Automatically enabled for ≥30 files
- Configurable in Settings if needed
-
Monitor progress:
- Progress bar shows percentage
- Time estimate updates in real-time
- Status messages show current operation
-
Review results:
- Statistics dashboard shows detailed breakdown
- Export to CSV for record-keeping
- Check log file for any errors
Best practices:
- Process files in batches of 200-300 for optimal performance
- Local files are faster than network files
- Wait for OneDrive sync to complete before labeling
Verified compatible:
- Tested with 100+ OneDrive files
- All operations successful
- Async operations handle cloud latency gracefully
Tips:
-
Wait for sync:
- Check OneDrive icon in system tray
- Ensure files are fully synced (not cloud-only)
- Green checkmark indicates ready
-
Performance:
- OneDrive sync can add 2-3 seconds per file
- Consider copying large batches locally first
- Use async operations (automatic for ≥30 files)
-
Troubleshooting:
- If files show as locked, wait for sync to complete
- Check OneDrive status in settings
- Verify files aren't open in Office Online
Access settings:
- Click "Settings" button
- Navigate through tabs:
- Warnings: Configure warning preferences
- Performance: Async operation thresholds
- Logging: Log verbosity and retention
Common adjustments:
Disable specific warnings:
- Uncheck warnings you don't need
- Speeds up workflow for experienced users
Adjust async thresholds:
- Lower thresholds = faster async activation
- Higher thresholds = less overhead for small batches
- Default values work well for most scenarios
Enable detailed logging:
- For troubleshooting
- Creates larger log files
- Disable when not needed
✅ Do:
- Process files in batches of 200-300
- Close files before labeling
- Use local copies for large network batches
- Wait for OneDrive sync to complete
- Keep async operations enabled
❌ Don't:
- Try to process 1000+ files in one batch
- Label files open in Office applications
- Process cloud-only OneDrive files
- Disable async operations unnecessarily
✅ Do:
- Use drag-and-drop for quick selection
- Use folder import for entire directories
- Check file count before applying
- Review current labels in the list
❌ Don't:
- Select mixed file types if unsure about labeling
- Forget to check "Include subfolders" setting
- Process files you don't have permission to modify
✅ Do:
- Review smart preview before applying
- Read warnings carefully
- Provide meaningful justification for downgrades
- Export results to CSV for records
- Check log files after large operations
❌ Don't:
- Skip preview without reading
- Ignore warnings (they're there for a reason)
- Use generic justifications for compliance-critical downgrades
- Forget to verify results after application
✅ Do:
- Check log files first (
Documents\FileLabeler_Logs\) - Verify files aren't open in other applications
- Ensure you have proper permissions
- Test with a few files before large batches
- Read error messages carefully
❌ Don't:
- Ignore error messages
- Retry immediately without investigating
- Process files without checking logs
- Continue with large batches after failures
Goal: Apply "Confidential" to all Word documents in a project folder
Steps:
- Click "Select folder..."
- Navigate to project folder
- Check "Include subfolders"
- Click "Select Folder"
- Files load with current labels shown
- Click "Confidential" label button
- Click "Apply label"
- Review smart preview (shows all changes)
- Click "Continue"
- Review statistics dashboard
- Export to CSV for project records
Expected result: All Word/Excel/PowerPoint/PDF files in folder tree labeled "Confidential"
Goal: Change files from "Internal" to "Public"
Steps:
- Select mislabeled files (any method)
- Current label shows "[Internal]"
- Click "Public" label button
- Click "Apply label"
- Smart preview shows "Downgrade" (if Public is lower rank)
- Click "Continue"
- Justification dialog appears
- Enter: "Correcting classification error"
- Click OK
- Labels applied
- Check log for verification
Expected result: Files successfully downgraded to "Public" with justification logged
Goal: Quickly label files received from external source
Steps:
- Open folder with new files
- Drag files directly to FileLabeler window
- Review current labels (likely "No label")
- Select appropriate label (e.g., "Internal")
- Click "Apply label"
- Smart preview shows all as "New"
- Click "Continue"
- Labels applied immediately
- Clear selection for next batch
Expected result: Fast workflow for daily file labeling tasks
Goal: Label and protect sensitive documents for specific team members
Steps:
- Select confidential files
- Click "Highly Confidential" (protected label)
- Click "Apply label"
- Smart preview shows changes
- Click "Continue"
- Protection dialog appears
- Select "Co-Author" permission level
- Enter team members' emails:
user1@company.com, user2@company.com - Optionally set expiration date
- Click OK
- Labels and protection applied
- Export CSV for access records
Expected result: Files labeled and accessible only to specified users with co-author rights
Goal: Generate compliance report of labeled files
Steps:
- Select folder to audit
- Check "Include subfolders"
- Files load with current labels
- Select label to verify/apply
- Click "Apply label"
- Smart preview shows:
- How many already have correct label (Unchanged)
- How many need labeling (New)
- Any misclassified (Upgrade/Downgrade)
- Check "Skip unchanged files"
- Click "Continue"
- Review statistics
- Export to CSV
- Open CSV in Excel for analysis
Expected result: Detailed compliance report showing all label statuses and changes
Currently, FileLabeler doesn't have keyboard shortcuts, but you can use standard Windows shortcuts:
- Ctrl+C: Copy selected file paths from list (if supported)
- Alt+F4: Close application
- Windows+D: Show desktop (minimize all)
Location:
C:\Users\<username>\Documents\FileLabeler_Logs\
FileLabeler_Log_yyyyMMdd_HHmmss.txt
Contents:
- Session start/end timestamps
- Files processed
- Labels applied
- Success/failure status
- Error messages with details
- Timing information
Log levels:
[INFO]: Normal operations[WARNING]: Non-critical issues[ERROR]: Failed operations[CRITICAL]: Application errors
Retention:
- Default: 30 days (configurable in Settings)
- Automatic cleanup of old logs
- Manual cleanup: Delete files in log folder
Format:
Summary
Total Files,15
Successful,14
Failed,1
Time Elapsed,00:00:23
File Details
FilePath,OriginalLabel,NewLabel,ChangeType,Status,Timestamp,Message
C:\Documents\file1.docx,Internal,Confidential,Upgrade,Success,2025-10-27 14:30:15,
C:\Documents\file2.xlsx,No label,Internal,New,Success,2025-10-27 14:30:16,
C:\Documents\file3.pdf,Confidential,Confidential,Unchanged,Skipped,2025-10-27 14:30:16,Skipped unchanged fileUses:
- Compliance auditing
- Troubleshooting
- Management reporting
- Change tracking
- Verification
- Status messages provide guidance
- Error dialogs include suggestions
- Warnings explain potential issues
- Log files contain detailed information
- Installation: INSTALLATION.md
- Configuration: CONFIGURATION.md
- Troubleshooting: TROUBLESHOOTING.md
- Developer Docs: development/
- Check Troubleshooting Guide
- Review log files
- Search GitHub Issues
- Create new issue with details
Happy Labeling! 🏷️
For technical details and architecture, see ARCHITECTURE.md.