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

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

Recommended Posts

  • Newbies
Posted

Hi, I have a FileMaker 6 solution on the Mac that exports a large number of htm files via xsl/xml export. I have created an AppleScript called by FM that changes the name of the files as it exports. This is below and it works very well. However, now I am migrating to a Window computer. Everything works, except of course for the AppleScript. Does anyone know how I can do what the AppleScript script does below but using VB (assuming that VB is what I should use)? I guess I need some who knows VB and perhaps enough to AppleScript to understand below.

copy cell "NZSCO99_5_ID" of current record to htmName

tell application "Finder"

set name of file "Macintosh HD:Documents:Ben:Work:Websites:Labour Market:Holder:1.htm" to htmName & ".htm"

end tell

Also I use 'Perform AppleScript' in FM scripting to call the AppleScript - do I use 'Perform Script' to call a VBScript on a Windows computer?

Posted

FM can't natively execute VBScript. You have 2 choices:

- either keep the VBscript external and when you execute it, pass the necessary variables on (htmName)

- or generate the syntax through scripted substitutes (placing the value of the NZS field directly in the VBscript). But then you need to create a physical VBscript so you can execute it. This can be a bit of a challenge in 6 without a file plugin.

I've written a couple of articles for FileMaker Advisor on this subject, you might want to check them out first.

The VBscript itself is very simple:

Set fs = CreateObject("Scripting.FileSystemObject")

fs.MoveFile "c:folderfile.htm", "c:foldernewName.htm"

Set fs = Nothing

The challenge is in creating the syntax *with* your variables, create the physical VBscript and execute it.

  • Newbies
Posted

Thanks Wim. What are the names of the articles you suggest I read?

My first thought is that this is not going to be as simple as using AppleScript with FM to export and rename multiple files.

Posted

There is another alternative...use WinBatch, which more than replaces Applescript on the Windows platform. It has really extensive file and folder manipulation capabilities and is very easy to use. It can also issue VB commands through its Control and ODBC extenders. web page

Steve

This topic is 7321 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.