Grouping files right away would overwrite them.
I need to identify each file with its original name AND the origin which would use a part of the path each file is originated from.
I want to rename my files, when downloading, using 1 or more part of the original path. It is then a variable as each file will be named after its own path. It is especially usefull when you download numerous projects with various pathes, and want to add this to a default template for all.
example: .../golf/UK/StEnodoc/scan001.jpg and .../golf/UK/WestCorwal/scan001.jpg
would become: .../golf/UK/StEnodoc/UK-StEnodoc-scan001.jpg and .../golf/UK/WestCorwal/UK-WestCornal-scan001.jpg
or: .../golf/UK/StEnodoc/StEnodoc-scan001.jpg and .../golf/UK/WestCorwal/WestCornal-scan001.jpg
(etc,...)
I found nothing about this in this forum, "Using URL Macros", "URL substitutes"
Is it possible?
What should be the pattern used into the URL substitute screen?
URL:
*.jpg
Replace:
/golf/UK/*/
With:
/golf/UK/*/*-
Best regards,
Oleg Chernavin
MP Staff
Example: http://3/2/1/x.jpg
If I write URL: *.jpg Replace:/3/**/*/ With:/3/**/*/*- (URL box not checked) I get: 3/2/1/1-x.jpg
If I write URL: *.jpg Replace:/3/**/*/ With:/3/**/*/**- (URL box not checked) I get: 3/2/1/2-x.jpg
If I write URL: *.jpg Replace:/3/**/*/ With:/3/**/*/**-*- (URL box not checked) I get: 3/2/1/2-1-x.jpg
Everything is fine up till now and this already a result!!
BUT, as soon as the path is relative, nothing works!
Example: if the URL is not anymore http://3/2/1/x.jpg but is http://3/3bis/2/1/x.jpg, or is http://5/3/4/2/1/x.jpg, my rule crashes and the file is not renamed.
If I write (relative )URL: *.jpg Replace:/**/*/ With:/**/*/*- (URL box not checked) I still get: x.jpg (nothing changed)
How can I select independently from the path and its length or number of folders, the folder BEFORE the file, and/or the folders at a level higher ex. in http://(whatever is in front)/3/2/1/x.jpg, be able to add 3 and/or 2 and/or 1 with 3/2/1 being variables.
For testing and illustrating what I mean, I have uploaded a small set of test files accessible from http://www.compain.com/index.htm . I tried without success to apply a common rule for the links on this page in order to add one of the last 3 part of the path without depending on the length and naming of the folders. Only the position of the folders is important, not the name.
Replace:
/2/**/*.jpg
With:
/2/**/**-*.jpg
?
Oleg.