Hello @Kyle7989
Below is a working example flow of your scenario.

Yon can copy & paste below code snippet to your Flow Designer window.
SET BaseFolderPath TO $'''C:\\Users\\User01\\Documents\\Move File To Right Folder'''
Folder.GetFiles Folder: BaseFolderPath FileFilter: $'''*.txt''' IncludeSubfolders: False FailOnAccessDenied: True SortBy1: Folder.SortBy.NoSort SortDescending1: False SortBy2: Folder.SortBy.NoSort SortDescending2: False SortBy3: Folder.SortBy.NoSort SortDescending3: False Files=> Files
LOOP FOREACH CurrentItem IN Files
Text.Split Text: CurrentItem.Name StandardDelimiter: Text.StandardDelimiter.Space DelimiterTimes: 1 Result=> TextList
SET TargetFolder TO $'''%BaseFolderPath%\\%TextList[0]%'''
File.Move Files: CurrentItem.FullName Destination: TargetFolder IfFileExists: File.IfExists.DoNothing MovedFiles=> MovedFiles
Display.ShowMessage Title: $'''File Moved''' Message: $'''[Source]
%CurrentItem.FullName%
[Destination]
%TargetFolder%''' Icon: Display.Icon.None Buttons: Display.Buttons.OK DefaultButton: Display.DefaultButton.Button1 IsTopMost: False ButtonPressed=> ButtonPressed
END
The result of running the above flow is as follows:
[BEFORE]
C:\USERS\USER01\DOCUMENTS\MOVE FILE TO RIGHT FOLDER
│ 123 acb.txt
│ 456 xyz.txt
│ 789 kus.txt
│
├─123
├─456
└─789
[AFTER]
C:\USERS\USER01\DOCUMENTS\MOVE FILE TO RIGHT FOLDER
├─123
│ 123 acb.txt
│
├─456
│ 456 xyz.txt
│
└─789
789 kus.txt
Thank you.