0
#!/bin/bash

files_path="/Volumes/HDD/Bogdan Data/"

rm -r "$files_path/files/*"

I'm getting an error that path cannot be found, probably due to the space character in the folder name. How should I approach this?

John Kugelman
  • 349,597
  • 67
  • 533
  • 578
Silithus
  • 181
  • 2
  • 13

1 Answers1

4

$files_path needs to be quoted, but the * glob must not be.

rm -r "$files_path"/files/*
John Kugelman
  • 349,597
  • 67
  • 533
  • 578