![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
![]() |
#1 |
Ace of the Deep
![]() Join Date: Dec 2005
Location: Canada
Posts: 1,124
Downloads: 110
Uploads: 0
|
![]()
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.
__________________
![]() |
![]() |
![]() |
![]() |
#2 |
Navy Seal
![]() Join Date: Sep 2009
Location: Valhalla
Posts: 5,295
Downloads: 141
Uploads: 17
|
![]()
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. Last edited by Feuer Frei!; 01-14-11 at 07:20 PM. |
![]() |
![]() |
![]() |
#3 |
Silent Hunter
![]() 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 ![]() |
![]() |
![]() |
![]() |
#4 |
Ace of the Deep
![]() |
![]()
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...? ![]() |
![]() |
![]() |
![]() |
#5 |
Ace of the Deep
![]() Join Date: Dec 2005
Location: Canada
Posts: 1,124
Downloads: 110
Uploads: 0
|
![]()
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?
![]()
__________________
![]() |
![]() |
![]() |
![]() |
|
|