Move text from one part of filename to another
XXXXXX &&&&&&&&&&&&&& ####Kbps.qvn
XXXXXX: Fixed length
&&&&: Variable length
####: Variable length
Would love to rename a few thousand files to:
&&&&&&&&&&&&&& XXXXXX ####Kbps.qvn
Any suggestions? Thanks.
XXXXXX: Fixed length
&&&&: Variable length
####: Variable length
Would love to rename a few thousand files to:
&&&&&&&&&&&&&& XXXXXX ####Kbps.qvn
Any suggestions? Thanks.
If "XXXXXX" and "&&&&&&&&&&&&&&" never contain any spaces then:
Replace: ([^ ]* )([^ ]* )
with: \2\1
Use regular expressions
Or (using the length of "XXXXXX " = 7 characters):
Replace: (.{7})([^ ]* )
with: \2\1
Use regular expressions
Otherwise you will have to give more details about the possible structure of "&&&&&&&&&&&&&&"
Replace: ([^ ]* )([^ ]* )
with: \2\1
Use regular expressions
Or (using the length of "XXXXXX " = 7 characters):
Replace: (.{7})([^ ]* )
with: \2\1
Use regular expressions
Otherwise you will have to give more details about the possible structure of "&&&&&&&&&&&&&&"
Reply to #2:
Hi David
Yes, both "XXXXXX" and "&&&&&&&&&&&&&&" can contain spaces. Lengths are variable as well.
Liked your suggestion for files that do not have spaces in "XXXXXX".
Thoughts on "XXXXXX" with spaces?
"XXXXXX"
Hi David
Yes, both "XXXXXX" and "&&&&&&&&&&&&&&" can contain spaces. Lengths are variable as well.
Liked your suggestion for files that do not have spaces in "XXXXXX".
Thoughts on "XXXXXX" with spaces?
"XXXXXX"
Reply to #3:
It is impossible with the information that you have given so far! Unless there are some unique features of the three strings that allow us to determine their boundaries there is no way to separate them in general.
You originally stated that "XXXXXX" is fixed-length, which would allow us to extract that component. To separate "&&&&&&&&&&&&&&" and " ####" we need to identify unique features of the two strings. For example I assume that "####" is a data rate ("Kbps") in which case it is likely to be a number with a determinable range of digits or possibly even discrete possible values which may allow us to distinguish it from "&&&&&&&&&&&&&&".
Please provide some typical examples of filenames.
It is impossible with the information that you have given so far! Unless there are some unique features of the three strings that allow us to determine their boundaries there is no way to separate them in general.
You originally stated that "XXXXXX" is fixed-length, which would allow us to extract that component. To separate "&&&&&&&&&&&&&&" and " ####" we need to identify unique features of the two strings. For example I assume that "####" is a data rate ("Kbps") in which case it is likely to be a number with a determinable range of digits or possibly even discrete possible values which may allow us to distinguish it from "&&&&&&&&&&&&&&".
Please provide some typical examples of filenames.