PDA

View Full Version : Copying a File to the Hard Drive


Desmond
10-03-2003, 02:06 PM
<HTML> <HEAD> <TITLE>AutoPlay Media Studio 5.0 Knowledge Base</TITLE> </HEAD> <BODY> <h3>Copying a File to the Hard Drive</h3> <b>Document ID: IR10083</b> <hr> The information in this article applies to: <ul> <li>AutoPlay Media Studio 5.0 Professional Edition</li> </ul> <hr> <h3>SUMMARY</h3> <p>This article describes how to copy a font to the user's system, and register it.</p> <h3>DISCUSSION</h3> <p>It is often useful to copy a file from CD-ROM to the user's computer. In AutoPlay Media Studio 5.0, this is accomplished with a File.Copy action.<br> <br> As an example, we will load a specific font onto the user's computer:<br> <br><code> --get the destination directory (in this case, where the fonts are stored)<br> fonts_dir = Shell.GetFolder(SHF_FONTS); -- Get the path to the user's Font directory.<br> <br> --copy the file from your cd to the user's font directory<br> File.Copy(_SourceFolder .. "\\my_font.ttf", fonts_dir..\\"my_font.ttf", false, true, false, true, nil);<br> <br> --register the font with windows<br> System.RegisterFont(fonts_dir .. "\\myfont.ttf", "My Font Name", true);<br></code> </p> <h3>MORE INFORMATION</h3> <p>For more information please see the following topics in the AutoPlay Media Studio 5.0 help file:</p> <ul> <li><b>Program Reference | Actions | Shell | Shell.GetFolder</b></li> <li><b>Program Reference | Actions | File | File.Copy</b></li> <li><b>Program Reference | Actions | System | System.RegisterFont</b></li> </ul> <p>KEYWORDS: AutoPlay Media Studio 5.0, File, Copy, Font, Register, CD </p> <hr> <FONT SIZE=1> Last reviewed: October 3, 2003<br> Copyright © 2003 <A HREF="http://www.indigorose.com" target="blank">Indigo Rose Corporation</a>. All rights reserved.<br> </FONT> </BODY> </HTML>