Hi Megha
This could certainly be done with Workflow as there is no native functional feature in the Client to do this.
In Workflow, I would likely set this up as a Business process where I could pick the Top Folder that I wanted to perform the action on and then have this run.
Step 1, Find all the Subfolders in the Top Folder
Step 2. Step through the found Results (For each Entry)
Inside Loop -
Step 3. Get the Folder Name
Step 4. Remove the spaces from the Folder Name using Pattern Matching or Token Calculator (Replace funtion) Replace Space with no character
Step 5. Rename the Folder with the new Name