jcotter Posted March 14, 2008 Share Posted March 14, 2008 Hi, does anyone know of a way to rename a file from within a FMP 5/6 script? (I am not referring to renaming an FMP data file, just a random file, such as a text file.) Thanks in advance. Quote Link to comment Share on other sites More sharing options...
AHunter3 Posted March 14, 2008 Share Posted March 14, 2008 Yeah. I see you're using Windows. Know DOS commands? If you use Send Message, and specify that the message goes to "cmd", and the text of the message is a DOS command, you are essentially performing command line instructions from within FileMaker. If you also have Macs, use Perform AppleScript and use "do script" to issue command line instrux as you would issue them from the Mac Terminal. Quote Link to comment Share on other sites More sharing options...
jcotter Posted March 14, 2008 Author Share Posted March 14, 2008 Can you be a little more specific? When I look at the "Send Message" script step in FMP 6, I see a dropdown box "Send the -- message". The options are "open document/application" and "print document". Then there are three radio buttons: file, field value and text. I don't see where I can both choose "CMD" and enter text data. Thanks for your response. Quote Link to comment Share on other sites More sharing options...
jcotter Posted March 14, 2008 Author Share Posted March 14, 2008 I think I got it. I had to play around with CMD a bit before I figured it out. I used the text radio button with the text: CMD /C "RENAME {fname1} {fname2}" It did not work without the /C Thanks for your help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.