Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Changing File Extensions to ".csv"

Featured Replies

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.

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.

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

  • 2 weeks later...
  • Author

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

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........

  • Author

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

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

  • Author

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?

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

  • Author

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.

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).

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.