Home » tip trick

Create Facilities Copy Files With VBS

admin 28 January 2008 tip trick No Comment
Copy and paste is a common activity done for the computer user in processing data and documents for their daily work. Another trick is with this one, copy and paste will be done automatically by the program of our own making. Is suitable for those who can not access the Windows Explorer by as protected by the administrator by using the password, but on the other side can still access the Command Prompt.

Only by using VBS (Visual Basic Script) can create a program capable of copying a file without having contact with other additional applications. Want to know how to make the program easy to copy the files to use? Please refer to programming instructions that will be explained through the steps below.

  • Open Notepad, turn off Word Wrap, then copy the script the following programs.

Dim kirim, kopi, susu
on error resume next
Set kirim = CreateObject(“Scripting.FileSystemObject”)
judul = “[ Kopi File ala PCplus ]“
kopi = InputBox(“Nama File Sumber?”,judul)
susu = InputBox(“Nama Tujuan?”,judul)
kirim.CopyFile kopi, susu
if err.number = 0 then
msgbox “File Sukses di transfer!”,vbokonly,judul
else
msgbox “File Gagal di transfer!”,vbokonly,judul
end if

  • Save KopiSusu.vbs name, and change the Save as type to All Files so that the program file that was created earlier can be saved with the extension vbs.

If all the above instructions have been executed, the next step which is run by KopiSusu.vbs file double-click on the file icon. Through the first window with the name of the file isikanlah to copy complete with the path along with the extensions, eg: c: \ prasdikatama-hamsphire [pdf]. Pdf file, and then click OK. In the next window enter the name of the destination of the files that have been copied will be placed. Simply enter the path alone, for example: d: \, and then click OK. It will automatically show a warning window telling you that copy the files successfully. But when one entered the path and file name and extension will be out a warning that the file failed to copy. Quite nice, is not it? Good luck!

www.icatama.org

Have your say!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>