/build/static/layout/Breadcrumb_cap_w.png

Custom Inventory Rule - Dealing with spaces in path names

QUESTION:


The other day I was looking to make a Custom Inventory Rule (CIR) for something on a Mac OSX device, and I wasn't having the best luck. 
One question I had, was if the path or filename had a space in it, do I need double quotes? Do I need to escape the space?

ANSWER:

Nothing special is needed. 

EXAMPLE 1:
DirectoryExists(/Applications/Utilities/Disk Utility.app)
EXAMPLE 2:
FileExists(/Library/Application Support/Dell/KACE/data/version.txt)


Notice that there is no backslash (\) between 'Application Support' and not double quotes ("") around the path. 
Just copy/paste the path as is and you're all set. 


I couldn't find this info written down anywhere so I thought I would share. 

Cheers!





Comments

  • Yes. it ends up being quoted by the K1000 - MacDude 4 years ago
This post is locked
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ