notepad programing - Geeks to Go Forums

Jump to content

Log in Register Register Malware removal guide How it works

notepad programing

#1 thayne182

  • Group: Member
  • Posts: 3
  • Joined: 07-May 12

Posted 07 May 2012 - 12:26 PM

Hi if some one could plz help i want to make a program using notepad that can copy two file and past them in a folder on windows

#2 spike_hacker_inc

  • Group: Member
  • Posts: 1,328
  • Joined: 27-April 05

Posted 07 May 2012 - 12:48 PM

View Postthayne182, on 07 May 2012 - 12:26 PM, said:

Hi if some one could plz help i want to make a program using notepad that can copy two file and past them in a folder on windows

Hey there thayne,

Well there are a number of ways to go about doing what it is you want to do... Assuming that this is all that you want to do, I think the easiest would be to use what is called "Batch" programming. You do not require a compiler and the coding logic is reasonably easy to understand. Although I must say it is extremely limited comparing it to other programming languages.

All you will require is your notepad and some knowledge about command prompt... If you require to do more advanced things, you might need to read a little bit more into "Batch" programming.

First start off by opening up Notepad... You can copy and paste this code in there if you like:

:: This will disable your code being outputted directly
@ echo off
:: This is the command prompt command for copying a file
copy "file1.docx" "C:\file1.doc"
copy "file2.docx" "C:\file2.doc"
:: This next command doesn't actually check for success of the copying (But is for illastration purposes on outputting text only)
echo  Files have been copied successfully!
:: This is just so that you can see what is being outputted
PAUSE

The next step is saving the file so that it can be executed...
It will require you to save the file as a ".bat" file extension. So when saving it in notepad and the "Save" dialog window comes up make sure that "Save as type:" is set to "All Files" and that your file name ends with the extension ".bat". Eg. "myProgram.bat"

That's like the very bare basics in response to your question! There are a number of ways to code what you want in batch, this I would reckon is the most simplest. If you like you can see other simple commands, do this by typing "help" in command prompt (Not all these work in batch programming, but can give you an idea of command prompt commands). Again there is alot more you can do in batch programming, including conditions, loops, ect. If you need anymore assistance, don't hesitate to ask.

Peace Out :cool:

#3 thayne182

  • Group: Member
  • Posts: 3
  • Joined: 07-May 12

Posted 07 May 2012 - 01:08 PM

Thx

Share this topic: