SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > General > General Topics > PC Hardware/Software forum
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 01-14-11, 04:33 PM   #1
bert8for3
Ace of the Deep
 
Join Date: Dec 2005
Location: Canada
Posts: 1,124
Downloads: 110
Uploads: 0
Default [?] how to make a simple exe file

I just want to make a simple exe file to copy the contents of one folder to another folder using syntax copy C:\folderA\*.* C:\folderB

Used to be ya just had to put that in a text file and rename the extension from txt to exe or even bat. Now it doesn't work and my Notepad doesn't give any option to save as an exe file (which I've read you can do).

Could be my operating system, I suppose. Am running Win XP Pro SP3 AFAIK 32-bit. Could also be because my knowledge of anything to do with this goes back to DOS days.

Appreciate if someone could tell me if/how to do this.
__________________
bert8for3 is offline   Reply With Quote
Old 01-14-11, 07:02 PM   #2
Feuer Frei!
Navy Seal
 
Join Date: Sep 2009
Location: Valhalla
Posts: 5,295
Downloads: 141
Uploads: 17
Default

Notepad saves in ANSI by default. It can't save in binary. EXE's need to be saved in binary form. You will need a compiler/ decoder.
.bat files can be created using notepad, just make sure you aren't saving as a .txt file.

Example:
start /d C:\Windows\System32\calc.exe
start /d "C:\Program Files\Mozilla Firefox" firefox.exe
start /d "C:\Program Files\Microsoft Office\Office12" EXCEL.EXE

this will just open Excel, Calculator and Firefox

The above command, start tells Windows to open a separate window to run the specified program.
The /d switch tells start command the path of the program. For starting Excel and Firefox, notice that the paths are in quotes, which is needed when there is a space in the file path.
To create batch files in notepad, make sure also when you copy file and folder paths that have spaces, to use quotes.
I don't know if this helps.
__________________
"History is the lies that the victors agree on"- Napoleon

LINK TO MY SH 3 MODS

Last edited by Feuer Frei!; 01-14-11 at 07:20 PM.
Feuer Frei! is offline   Reply With Quote
Old 01-14-11, 09:39 PM   #3
CaptainHaplo
Silent Hunter
 
CaptainHaplo's Avatar
 
Join Date: Apr 2007
Posts: 4,404
Downloads: 29
Uploads: 0
Actually - with a bat file - you do want to save as a text file. Make sure you save it in a text format (not rich text) and then just change the file extension to .bat

doubleclick the file and your done.

Or - if your old school... you can use the copy con (Filename.ext) command and write it the prehistoric way
__________________
Good Hunting!

Captain Haplo
CaptainHaplo is offline   Reply With Quote
Old 01-15-11, 05:23 AM   #4
Jan Kyster
Ace of the Deep
 
Join Date: Oct 2006
Posts: 1,151
Downloads: 152
Uploads: 0


Default

Erh... in NotePad you simply choose "Save as..." and then type filename.bat

No need for a rename then.


Of course we old DOS folks all use EdLin...?
Jan Kyster is offline   Reply With Quote
Old 01-15-11, 09:28 AM   #5
bert8for3
Ace of the Deep
 
Join Date: Dec 2005
Location: Canada
Posts: 1,124
Downloads: 110
Uploads: 0
Default

Thanks everyone. I had spaces in the file path and didn't use quotemarks. Darned file and folder (I still call them directory, although not so often anymore) names should be limited to what was it ... 8 characters? Thanks again.
__________________
bert8for3 is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 09:49 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 1995- 2024 Subsim®
"Subsim" is a registered trademark, all rights reserved.