November 7, 200421 yr Newbies 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?
November 8, 200421 yr 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.
November 10, 200421 yr Author Newbies 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.
November 10, 200421 yr 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
Create an account or sign in to comment