#1 : 17/06-15 10:09 Kalroz
Posts: 5
|
Hello. I have many files like this:
Garden. Rose garden012345.Flower garden34567.txt Garden_Rose_garden01234_flower garden34567_net_original.txt Please give me the suggestion of removing the last words and a number sequent. I want to rename the files like this: Garden. Rose garden.txt Garden_Rose_garden.txt Thank you. |
#2 : 17/06-15 10:36 Tester123
Posts: 92
|
Assuming your filename is of the following structure:
<at least one non-digit><at least one digit><zero or more of any character>.<ext> then the following 'Remove pattern' method should work: Pattern: \d{1,}.* Use regular expression: Tick |
#3 : 17/06-15 11:50 Kalroz
Posts: 5
|
Reply to #2: Thank you for the fast replay, but the pattern doesn'tworking. There is the name of some files:
Hitchcock_ Alfred _Galereya_prizrakov_Litmir.net_bid1970879_original_ee25553 Hitchcock_ Alfred _Galereya_prizrakov_Antology__Litmir.net_966507 Hitchcock_ Alfred _Galereya_prizrakov_Litmir.net_bid2050324_original_955f76 I want to remove the last words, like this: Hitchcock, Alfred - Galereya prizrakov Hitchcock, Alfred - Galereya prizrakov. Antology Thank you |
#4 : 17/06-15 15:24 Tester123
Posts: 92
|
Reply to #3:
That's because the files: Hitchcock_ Alfred _Galereya_prizrakov_Litmir.net_bid1970879_original_ee25553 Hitchcock_ Alfred _Galereya_prizrakov_Antology__Litmir.net_966507 Hitchcock_ Alfred _Galereya_prizrakov_Litmir.net_bid2050324_original_955f76 do not conform to the structure: <at least one non-digit><at least one digit><zero or more of any character>.<ext> which I guessed from your original examples. The remove pattern method was based on this guessed format. Maybe you can give a more precise description of the rule you would like applied. To get you thinking, what is the rule for changing: Hitchcock_ Alfred _Galereya_prizrakov_Litmir.net_bid1970879_original_ee25553 to Hitchcock, Alfred - Galereya prizrakov and Hitchcock_ Alfred _Galereya_prizrakov_Antology__Litmir.net_966507 to Hitchcock, Alfred - Galereya prizrakov. Antology I don't see any obvious rule from these two examples, especially when combined with your original examples. |
#5 : 18/06-15 08:55 Kalroz
Posts: 5
|
Reply to #4:
Thank you |