Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4906 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have a simple need to change the extensions of different files to be imported every day in a FM11Adv run time solution from ".xxx" to ".csv".

Will the Scriptmaster plug enable me to do that?

Thanks.

Posted

Yes

I have a simple need to change the extensions of different files to be imported every day in a FM11Adv run time solution from ".xxx" to ".csv".

Will the Scriptmaster plug enable me to do that?

Thanks.

  • 2 weeks later...
Posted

You will want to use the Move Or Reame File module included in the ScriptMaster.fp7 file.

Thanks. I got Scriptmaster and built the registration into my start-up script.

Here's the syntax I came up with for applying MoveOrRenameFile within a SetVariable step named RenameExt in the script to import the file that needs to have its extension changed:

MoveOrRenameFile(

C:/Documents and Settings:/user:/Desktop:/OMHOfficial061511:/AP0618.drf;

C:/Documents and Settings:/user:/Desktop:/OMHOfficial061511:/AP0618.csv;)

Something's not right...it returns to me that the table cannot be found.

Can you advise what is wrong with this?

Thanks again.

Dave

Posted

MoveOrRenameFile(

C:/Documents and Settings:/user:/Desktop:/OMHOfficial061511:/AP0618.drf;

C:/Documents and Settings:/user:/Desktop:/OMHOfficial061511:/AP0618.csv;)

MoveOrRenameFile(

"C:/Documents and Settings:/user:/Desktop:/OMHOfficial061511:/AP0618.drf";

"C:/Documents and Settings:/user:/Desktop:/OMHOfficial061511:/AP0618.csv"

Try adding the quotes....

.. and does the last ';' go in there? I'm thinking not........

Posted

MoveOrRenameFile(

"C:/Documents and Settings:/user:/Desktop:/OMHOfficial061511:/AP0618.drf";

"C:/Documents and Settings:/user:/Desktop:/OMHOfficial061511:/AP0618.csv"

Try adding the quotes....

.. and does the last ';' go in there? I'm thinking not........

Yes, thanks. You are right; I can now save the Set Variable Step in the script.

But nothing happens when I run the script. Is this something else I have to do to accomplish the conversion?

Thanks again.

Dave

Posted

Those paths don't look correct. Windows paths do not have colons, except after the drive letter.

Posted

Those paths don't look correct. Windows paths do not have colons, except after the drive letter.

Thanks. That did the trick.

One more ? if you don't mind?

How do I deal with that the file name to be converted will be different each time an extension conversion is needed, to be followed by an import of the file with the converted extension?

Posted (edited)

How do I deal with that the file name to be converted will be different each time an extension conversion is needed, to be followed by an import of the file with the converted extension?

You will have to extract the file name from your path. If you do this in a FileMaker calculation, you do it with a combination of these functions: PatternCount, Position, Middle. Alternatively, there is a function called 'PathAsFile' in an open source project I'm working on, which you can find here: https://github.com/dansmith65/ooScriptMaster

Edited by dansmith65
Posted

You will have to extract the file name from your path. If you do this in a FileMaker calculation, you do it with a combination of these functions: PatternCount, Position, Middle. Alternatively, there is a function called 'PathAsFile' in an open source project I'm working on, which you can find here: https://github.com/dansmith65/ooScriptMaster.

I'm getting a message returned from the link that "This is not the page you are looking for". Does that make sense?

Thanks for your help.

Posted

I'm getting a message returned from the link that "This is not the page you are looking for". Does that make sense?

Thanks for your help.

sorry, I had a period at the end of the line, which broke the link. I fixed it now (in my last post).

This topic is 4906 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.