I am getting a count of files with a certain name extension in a directory chosen by the user like so:
set fileCount to do shell script "find " & (quoted form of usrTarget) & " -name \"*.asd\" | wc -l"
When the resulting number is printed in my confirmation dialog:
set confirmDialog to display dialog "Found" & (fileCount) & " files with the name extension \".asd.\" Ready to delete? This action cannot be undone!" with icon file rxIcon buttons {"Abort", "Delete"} default button "Delete"
The dialog works fine, but it keeps the spaces that are included in the output of the shell script. How would I go about removing those spaces from my "fileCount" variable for the sake of the dialog not looking weird? e.g
"Found: 104 files with the name extension .asd." instead of
"Found: 104 files with the name extension .asd."