eqitec Posted June 15, 2011 Posted June 15, 2011 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.
Tim Anderson Posted June 15, 2011 Posted June 15, 2011 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.
Smef Posted June 17, 2011 Posted June 17, 2011 You will want to use the Move Or Reame File module included in the ScriptMaster.fp7 file.
eqitec Posted June 29, 2011 Author Posted June 29, 2011 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
Cabinetman Posted June 29, 2011 Posted June 29, 2011 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........
eqitec Posted June 29, 2011 Author Posted June 29, 2011 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
bcooney Posted June 29, 2011 Posted June 29, 2011 Those paths don't look correct. Windows paths do not have colons, except after the drive letter.
eqitec Posted June 29, 2011 Author Posted June 29, 2011 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?
dansmith65 Posted June 29, 2011 Posted June 29, 2011 (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 June 30, 2011 by dansmith65
eqitec Posted June 30, 2011 Author Posted June 30, 2011 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.
dansmith65 Posted June 30, 2011 Posted June 30, 2011 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).
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now