rejetto forum
Software => HFS ~ HTTP File Server => HTML & templates => Topic started by: s4isw4l4qu4tro on February 09, 2010, 03:06:32 AM
-
Hello HFS coders,
I have a folder where users can upload files that contains a bunch of pdf files, i need to rename this files from
(before)
5311_428A_rev-0.pdf
3456_a142_rev-C.pdf
3471_p465_rev-A.pdf
3110_10A_rev-F.pdf
3511_m17_rev-1.pdf
(after)
428A.pdf
a142.pdf
p465.pdf
10A.pdf
m17.pdf
then move the renamed file to a specified folder & delete the contents in the upload folder
Can this be achieve with diff template?
Help much apprciated
-
something as
[upload name]
{.if{.%item-ext% = pdf.}
|{:{substring|_|_|%item-name%|include=none.}.%item-ext%.}:}
|{:%item-name%:}
/if}
[upload completed]
{.move| ...... read the wiki to more help
{.delete|.....
with this, only the uploaded file as first_new_last.pdf is renamed to new.pdf , others are not changed.
-
the scripts mars posted must be put in the EVENTS, not diff template.
ALT+F6
-
ALT+F6
events are only avalable with build beta ;)