Hi,
I'd like to create a task that can recognize which part of a file name it needs to copy. Files (they're pfds btw, but I guess it doesn't matter) are always formatted as:
author - year - title.pdf
of which I'd like to copy only the "title" part. What would be the easiest way of doing this?
Thanks in advance,
Rob
Extracting part of file name
Extracting part of file name
You may use "delemit variable" action.
Suppose you get the file name in the file loop
C:\myfiles\John Smith - 1995 - My book.pdf
In order to extract filename only use variable {ExtractFileNameNoExt()}.
You will get the string "John Smith - 1995 - My book"
Next, use delemit variable and you get standartd comma-separated string: "John Smith","1995","My book"
If you store the result into variable MyVar (for example) you can get any part by number, like this:
MyVar(0) = John Smith
MyVar(1) = 1995
MyVar(2) = My book
Suppose you get the file name in the file loop
C:\myfiles\John Smith - 1995 - My book.pdf
In order to extract filename only use variable {ExtractFileNameNoExt()}.
You will get the string "John Smith - 1995 - My book"
Next, use delemit variable and you get standartd comma-separated string: "John Smith","1995","My book"
If you store the result into variable MyVar (for example) you can get any part by number, like this:
MyVar(0) = John Smith
MyVar(1) = 1995
MyVar(2) = My book
Last edited by Oleg on Mon Sep 08, 2008 11:24 am, edited 1 time in total.
Extracting part of file name
Thanks!
It works brilliant now!
Great software!
Rob
It works brilliant now!
Great software!
Rob