Action file creation and names

I have an action that writes various data to 2 different files and then uploads them to the same directory of the page/form it is applied to, problem is the file names are critical … for various reasons they cannot be anything different than the name set in the action. (Actually 1 could but the other not)

As we know FW just loves to add chars onto file names it creates, unfortunately I never thought of this overflowing into the action side as well… so here are the problems:

1# If the action is applied to more than one page the file that is created is created again for each page with an a added to the name, then another with a b added to the name etc.

2# After deleting the action from all pages except the first it was applied to I now have one file uploaded but with a b on the end and not the original name as directed in the action.

This is not good, certainly for this action anyway, so… is it possible to force the file name to be xxx.php and yyy.php, then if the action is applied to more than one page just have one copy of the file that the action creates ‘with the exact specified name in the action’ uploaded rather than xxxa.php, xxxb.php and yyya.php, yyyb.php etc. ?

Mike


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Sometime around 18/12/07 (at 16:26 -0500) Mike B said:

This is not good, certainly for this action anyway, so… is it
possible to force the file name to be xxx.php and yyy.php, then if
the action is applied to more than one page just have one copy of
the file that the action creates ‘with the exact specified name in
the action’ uploaded rather than xxxa.php, xxxb.php and yyya.php,
yyyb.php etc. ?

Or possibly have the file name include the page it relates to?
An off-the-cuff thought, and probably highly difficult to implement
both from the Freeway and the action end.
Never mind, I’ll get my coat…

k


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I haven’t even looked if I can access the name for the file within the
action because this would only work for one of the files, it wouldn’t
work with the second as I have no control over the name after the file
data that includes the name in is implimented into the action, thats
why the name needs to be exactly as it is told to be.

Mike

On Dec 18, 2007, at 10:29 PM, Keith Martin wrote:

Sometime around 18/12/07 (at 16:26 -0500) Mike B said:

This is not good, certainly for this action anyway, so… is it
possible to force the file name to be xxx.php and yyy.php, then if
the action is applied to more than one page just have one copy of
the file that the action creates ‘with the exact specified name in
the action’ uploaded rather than xxxa.php, xxxb.php and yyya.php,
yyyb.php etc. ?

Or possibly have the file name include the page it relates to?
An off-the-cuff thought, and probably highly difficult to implement
both from the Freeway and the action end.
Never mind, I’ll get my coat…

k


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

No you can’t, and yes this is a big problem area altogether.

About the best you could do would be to set a variable once the file
is created the first time, and only create the file if it hasn’t
already been created.

As far as the file “b” name sticking, you can try emptying the site
folder and re-publishing to reset the file name.

Walter

On Dec 18, 2007, at 4:26 PM, Mike B wrote:

I have an action that writes various data to 2 different files and
then uploads them to the same directory of the page/form it is
applied to, problem is the file names are critical … for various
reasons they cannot be anything different than the name set in the
action. (Actually 1 could but the other not)

As we know FW just loves to add chars onto file names it creates,
unfortunately I never thought of this overflowing into the action
side as well… so here are the problems:

1# If the action is applied to more than one page the file that is
created is created again for each page with an a added to the name,
then another with a b added to the name etc.

2# After deleting the action from all pages except the first it was
applied to I now have one file uploaded but with a b on the end and
not the original name as directed in the action.

This is not good, certainly for this action anyway, so… is it
possible to force the file name to be xxx.php and yyy.php, then if
the action is applied to more than one page just have one copy of
the file that the action creates ‘with the exact specified name in
the action’ uploaded rather than xxxa.php, xxxb.php and yyya.php,
yyyb.php etc. ?

Mike


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

That’s a shame, I can now imagine this must be a major stumbling block
for some action developers! I knew this was Freeways behaviour… I
would put money on it that I have sent Softpress the most amount of
emails over the years regarding this problem, just didn’t for once
think this restriction would exist in action development.

The reason I was creating this action was to try and make things
simpler for the Freeway user, if I have to tell them to empty the site
folder and republish for when this will happen (probably quite a lot)
then this kind of defeats the object. lol

I guess the safest way around this problem is to have the action to
implement the include code and do everything else on the page then
make the user aware that they need to FTP the scripts to the server, I
feel disappointed!

Thanks
Mike

On Dec 18, 2007, at 10:48 PM, Walter Lee Davis wrote:

No you can’t, and yes this is a big problem area altogether.

About the best you could do would be to set a variable once the file
is created the first time, and only create the file if it hasn’t
already been created.

As far as the file “b” name sticking, you can try emptying the site
folder and re-publishing to reset the file name.

Walter

On Dec 18, 2007, at 4:26 PM, Mike B wrote:

I have an action that writes various data to 2 different files and
then uploads them to the same directory of the page/form it is
applied to, problem is the file names are critical … for various
reasons they cannot be anything different than the name set in the
action. (Actually 1 could but the other not)

As we know FW just loves to add chars onto file names it creates,
unfortunately I never thought of this overflowing into the action
side as well… so here are the problems:

1# If the action is applied to more than one page the file that is
created is created again for each page with an a added to the name,
then another with a b added to the name etc.

2# After deleting the action from all pages except the first it was
applied to I now have one file uploaded but with a b on the end and
not the original name as directed in the action.

This is not good, certainly for this action anyway, so… is it
possible to force the file name to be xxx.php and yyy.php, then if
the action is applied to more than one page just have one copy of
the file that the action creates ‘with the exact specified name in
the action’ uploaded rather than xxxa.php, xxxb.php and yyya.php,
yyyb.php etc. ?


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I guess a way around this might be to have the action delete the files
if it they exist… before the action actually starts the creation
process.

This might work, as long as any files created for pages in different
folders use the original file name there.

Mike

On Dec 18, 2007, at 11:03 PM, Mike B wrote:

The reason I was creating this action was to try and make things
simpler for the Freeway user, if I have to tell them to empty the site
folder and republish for when this will happen (probably quite a lot)
then this kind of defeats the object. lol


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options