June 28, 201114 yr I'm still looking for the best way for users to change the file extension on a file to be imported from ".xxx" to ".csv". Someone suggested this would be possible using a VB script. I did a google search for one and came up with this: oFS.GetFile( sFSpec ).Name = sName & ".csv" oTS.Close Are there any VB script experts out there who can confirm that this will work in a Filemaker Pro 11 Adv runtime or suggest how it might need to be changed to accomplish the goal. Also, what would be the Appelscript equivalent for my Mac runtime users? Thanks. Dave
June 28, 201114 yr No, the bit of VBScript syntax you have there won't work. It's very incomplete and does not include a rename command. Using a VBscript is a bit overkill for this simple task. It would be much easier to execute a command line with the Send Event script step. The syntax to execute would look something like this: cmd /c ren c:\somePath\someFile.xxx someFile.csv
June 30, 201114 yr Author No, the bit of VBScript syntax you have there won't work. It's very incomplete and does not include a rename command. Using a VBscript is a bit overkill for this simple task. It would be much easier to execute a command line with the Send Event script step. The syntax to execute would look something like this: cmd /c ren c:\somePath\someFile.xxx someFile.csv Thanks. I like your approach. One more ?. How should I deal with the issue that someFile.xxx will have a different name for each time the user downloads a new one? Today might be AP063011.xxx, and tomorrow could be FL070111.xxx.
July 1, 201114 yr Author Thanks. I like your approach. One more ?. How should I deal with the issue that someFile.xxx will have a different name for each time the user downloads a new one? Today might be AP063011.xxx, and tomorrow could be FL070111.xxx. Using Send Event, on the Windows side it turned out to be quite as simple as..... cmd /c ren "C:\Folder\*.xxx"; "*.csv" But, what will the equivalent be on the Mac side? Thanks.
July 2, 201114 yr Thanks. I like your approach. One more ?. How should I deal with the issue that someFile.xxx will have a different name for each time the user downloads a new one? Today might be AP063011.xxx, and tomorrow could be FL070111.xxx. The send event lets you specify a calculation to produce the command string. So you can easily use a variable in there that holds the name of the particular file...
Create an account or sign in to comment