Hello,
I have over 30 files I download daily into 1 folder that all have different names. I need to remove the last 13 characters on each file name, so from the dash to the end. I just don't know what to put in "text to remove". Everything I've tried gives me an error. Is this possible?
For this example I just need it to be ABCDE Test and FGHIJ Report.
Any help is greatly appreciated. Thanks in advance!
Hi @marksben32
If the above post resolves your issue, then click on ACCEPT AS SOLUTION , so that it will helpful to others
Cheers,
Srini
That worked! Thank you so much!
Hi @marksben32
Try as below
Folder.GetFiles Folder: $'''D:\\Test_String''' FileFilter: $'''*''' IncludeSubfolders: False FailOnAccessDenied: True SortBy1: Folder.SortBy.NoSort SortDescending1: False SortBy2: Folder.SortBy.NoSort SortDescending2: False SortBy3: Folder.SortBy.NoSort SortDescending3: False Files=> Files3
LOOP FOREACH CurrentItem3 IN Files3
IF Contains(CurrentItem3, $'''-''', False) THEN
Text.SplitText.SplitWithDelimiter Text: CurrentItem3 CustomDelimiter: $'''-''' IsRegEx: False Result=> TextList
File.RenameFiles.Rename Files: CurrentItem3 NewName: TextList[0] KeepExtension: True IfFileExists: File.IfExists.DoNothing RenamedFiles=> RenamedFiles
END
END
If you find this reply helpful, please consider giving it a LIKE AND
If this reply answers your question or solves your issue, please ACCEPT AS SOLUTION
Cheers,
Srini
WarrenBelz
146,731
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,075
Most Valuable Professional