web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Renaming directory whe...
Power Automate
Unanswered

Renaming directory when path contains spaces

(1) ShareShare
ReportReport
Posted on by 4
I hope I'm just being stupid here.
 
I'm using a DOS command to get data about a file within a given directory, then using Crop Text to extract a specific part of this data. What I'm trying to do now is take that cropped data and add it to the end of the directory name, encased in square brackets ( [ ] ), giving a result of "<original Directory Name> [<extractedData>]". The problem is that the Rename Folder operation keeps failing, saying one of two errors depending on the code.
 
If the code looks like the below (double and single quotes give the same outcome), the error says that the Directory doesn't exist, which looking at the file system, is wrong.
 
However, if the code looks like the below, the error says that it "Can't rename folder" due to there being "Illegal characters in path", which I presume are the spaces in the path to Game.Directory, based off of the fact that the error changes when putting the "Folder to rename" in quotes as shown above.
 
Any ideas as to how to fix this? Preferably not removing the spaces in Game.Directory, but if it's the only solution then beit the solution
Categories:
I have the same question (0)
  • ronaldwalcott Profile Picture
    3,847 Super User 2025 Season 2 on at
    Have you placed this question in the correct forum?
  • SirenGlitch Profile Picture
    4 on at
    Honestly I'm not sure, it's a problem with Power Automate, and I saw other people asking questions in the General Discussion forum so I followed, no idea if it was the right forum for the job
  • ronaldwalcott Profile Picture
    3,847 Super User 2025 Season 2 on at
    Is this Power automate desktop?
  • SirenGlitch Profile Picture
    4 on at

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard