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

Community site session details

Session Id :
Power Automate - Power Automate Desktop
Answered

File name is getting Changed in to numericals.

(1) ShareShare
ReportReport
Posted on by 12
 
Hi Team,
 
I am currently working on a process where I need to match the Name and Pincode from an Excel file with corresponding folder names. The folder names are in the format `Name_Pincode`. To achieve this, I used the "Get Files in Folder" action to retrieve the folder names and a "For Each" loop to iterate through the Excel file. However, I encountered an issue where the folder names are being replaced by GUIDs instead of showing the actual folder names.
For example, my original folder name is:
C:\Users\XYXXX\AAAAAA\XYZ Documents\XYZ_10002
But after looping, the folder name appears as:
C:\Users\XYXXX\AAAAAA\XYZ Documents\.849C9593-D756-4E56-8D6E-42412F2A707B
 
Could you please help me resolve this issue so that I can match the folder names correctly without changing the actual folder name on the filesystem?

Thanks 
Shreyansh
Categories:
I have the same question (0)
  • Deenuji_Loganathan_ Profile Picture
    6,206 Super User 2025 Season 2 on at
    File name is getting Changed in to numericals.
    Hi,
     
    Could you please share some screen of desktop flows and your folder and files looks like?
     
    We will assess them and guide you accordinlhy. 
  • SH-31071023-0 Profile Picture
    12 on at
    File name is getting Changed in to numericals.
    HI,

    Please find the screenshot of folder:

  • Riyaz_riz11 Profile Picture
    3,661 Super User 2025 Season 2 on at
    File name is getting Changed in to numericals.
    Hi,
    Please share the screenshot on desktop flow.
     
  • Verified answer
    WillSG Profile Picture
    352 Moderator on at
    File name is getting Changed in to numericals.
    Hi @ I hope you are doing well.

    The issue is because you are using the Get Files in Folder Actions, this action will get you ALL the files contains into the main folder or subfolders.

    Instead, you need to use the Action name “Get Subfolders in Folder”, in this way you will get a full list of all the folders contains into your main folder.


    Then, you can continue your process validating each folder to make sure it matches the Name_Pincode out of your spreadsheet.

    See the sniped code below:

    SET FolderVariable TO $'''YOUR MAIN FOLDER PATH GOES HERE'''
    Folder.GetSubfolders Folder: FolderVariable FolderFilter: $'''*''' IncludeSubfolders: False FailOnAccessDenied: True SortBy1: Folder.SortBy.NoSort SortDescending1: False SortBy2: Folder.SortBy.NoSort SortDescending2: False SortBy3: Folder.SortBy.NoSort SortDescending3: False Subfolders=> Folders
    LOOP FOREACH CurrentItem IN Folders
        Display.ShowMessageDialog.ShowMessage Message: CurrentItem.Name Icon: Display.Icon.None Buttons: Display.Buttons.OK DefaultButton: Display.DefaultButton.Button1 IsTopMost: True ButtonPressed=> ButtonPressed
    END



    You can use this other approach to validate if a folder exist or don’t:


    SET FolderVariable TO $'''YOUR MAIN FOLDER PATH GOES HERE'''
    Variables.CreateNewList List=> List
    # I'm creating the Names here below, but they should come out of your Excel File, then you use the FOR EACH Action to review each FILE NAME
    Variables.AddItemToList Item: $'''Vendor TEST_400606''' List: List
    Variables.AddItemToList Item: $'''Vendor TEST_400608''' List: List
    Variables.AddItemToList Item: $'''Vendor TEST_400610''' List: List
    LOOP FOREACH CurrentItem IN List
        /# To validate the folder path it's required to use the following:
    %FolderVariable%\\%CurrentItem%
    FolderVariable: Is the Main Folder Path
    \\CurrentItem: is the name of the Excel List
    This action will validate if the folder Exist, and it does, an action will be taken.
    If the folder doesn't not exit, the Bot could write in the Excel file that the Folder Name does not exist.

    Some ideas that you can use.#/
        IF (Folder.IfFolderExists.Exists Path: $'''%FolderVariable%\\%CurrentItem%''') THEN
            Display.ShowMessageDialog.ShowMessage Title: $'''Hello User!''' Message: $'''YOUR ROCK!''' Icon: Display.Icon.None Buttons: Display.Buttons.OK DefaultButton: Display.DefaultButton.Button1 IsTopMost: True ButtonPressed=> ButtonPressed
        END
    END


    Please let me know if it works, happy automation!,

    If I have addressed your inquiry successfully, kindly consider marking my response as the preferred solution. If you found my assistance helpful, a 'Thumbs Up' would be greatly appreciated.
     
    Additionally, if you have any questions feel free to DM me, and we can initiate a discussion.

    Finally, here is my YOUTUBE CHANNEL please subscribe to my channel and connect with me on LinkedIn Profile.

    Kind regards,
     
    Will SG
    Founder & Director
    RAMSolutions
    www.ramscr.com

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 666 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 382 Moderator

#3
developerAJ Profile Picture

developerAJ 254

Last 30 days Overall leaderboard