New Posts  All Forums:Forum Nav:

Batch File question

post #1 of 5
Thread Starter 
Can you get a batch file to copy and paste text into a notepad document and save it?
Red Thunder
(19 items)
 
  
CPUMotherboardGraphicsRAM
i5 2500k ASRock Fatal1ty Z68 Pro3 Gen3 Diamond Multimedia HD 5970 G.Skill Ripjaws X 8GB 
Hard DriveHard DriveOptical DriveCooling
OCZ Solid 3 60GB Seagate Barracuda 7200.9 160GB Lite-On iHAS424 Sunbeam Twister 120 
OSMonitorKeyboardPower
Windows 7 Ultimate 64-bit Samsung SyncMaster E1920X Logitech K120 Corsair GS700 
CaseMouseMouse PadAudio
NZXT Phantom Razer Naga None Realtek ALC892 
OtherOtherOther
Behringer Xenyx 502 Lepai LP-2020A+ Dayton Audio B652 
  hide details  
Reply
Red Thunder
(19 items)
 
  
CPUMotherboardGraphicsRAM
i5 2500k ASRock Fatal1ty Z68 Pro3 Gen3 Diamond Multimedia HD 5970 G.Skill Ripjaws X 8GB 
Hard DriveHard DriveOptical DriveCooling
OCZ Solid 3 60GB Seagate Barracuda 7200.9 160GB Lite-On iHAS424 Sunbeam Twister 120 
OSMonitorKeyboardPower
Windows 7 Ultimate 64-bit Samsung SyncMaster E1920X Logitech K120 Corsair GS700 
CaseMouseMouse PadAudio
NZXT Phantom Razer Naga None Realtek ALC892 
OtherOtherOther
Behringer Xenyx 502 Lepai LP-2020A+ Dayton Audio B652 
  hide details  
Reply
post #2 of 5
where are you copying text from? another text document? if so, you don't need to go through notepad.
Quote:
To read from a file use "type"
To copy, use "copy"
To output to a file, use ">"
To append to a file with another one, use ">>"
Code:
type filea.txt > newfile.txt
copy newfile.txt somepath\
type file1.txt >> currentfile.txt
Fractal Design
(15 items)
 
775 4 life
(15 items)
 
 
CPUMotherboardGraphicsRAM
Intel i7 2600K Biostar TP67XE NVidia GTX 570 Crucial Ballistix 
Hard DriveHard DriveCoolingOS
Crucial C300 RealSSD SDD Samsung F4 2TB Noctua NH-D14 Windows 7 Professional x64 
MonitorMonitorKeyboardPower
Asus VH202T 20'' 1600x900 Acer P244W 24" 1920 x 1080 Apple Keyboard with Numeric Keypad SeaSonic M12II 620W 
CaseMouseAudio
Fractal Design Define XL Titanium Grey Razor Abyssus Creative Sound Blaster X-FI Xtreme Gamer 
CPUMotherboardGraphicsRAM
Intel X3350 3.2Ghz @ 1.25v Gigabyte-GA-P35-DS3L (rev 2) XFX 4870 1GB 4GB OCZ Reaper PC2-6400 
RAMHard DriveHard DriveOptical Drive
2GB Corsair XMS2 PC2-6400 Crucial C300 64GB SSD 2TB Samsung Spinpoint F4 Sony Super Multi 
OSMonitorPowerCase
Windows 7 Professional x64 SP1 Asus VH202T 20'' 1600x900 SeaSonic M12II 620W Cooler Master Centurion 5 
Mouse
Razor Abyssus 
CPUMotherboardGraphicsRAM
Core i5-520M Lenovo 2522BF3 NVIDIA® Quadro® NVS3100M  Ramaxel Technology 4Gb DDR3 
Hard DriveOptical DriveOSMonitor
Samsung SSD 128GB 1.8" Micro SATA  hl-dt-st dvdram gu10n Windows 7 Enterprise (64-bit) 14.1" WXGA (1280x800) display, anti-glare, LED ... 
Power
9-cell plus Slice battery 
  hide details  
Reply
Fractal Design
(15 items)
 
775 4 life
(15 items)
 
 
CPUMotherboardGraphicsRAM
Intel i7 2600K Biostar TP67XE NVidia GTX 570 Crucial Ballistix 
Hard DriveHard DriveCoolingOS
Crucial C300 RealSSD SDD Samsung F4 2TB Noctua NH-D14 Windows 7 Professional x64 
MonitorMonitorKeyboardPower
Asus VH202T 20'' 1600x900 Acer P244W 24" 1920 x 1080 Apple Keyboard with Numeric Keypad SeaSonic M12II 620W 
CaseMouseAudio
Fractal Design Define XL Titanium Grey Razor Abyssus Creative Sound Blaster X-FI Xtreme Gamer 
CPUMotherboardGraphicsRAM
Intel X3350 3.2Ghz @ 1.25v Gigabyte-GA-P35-DS3L (rev 2) XFX 4870 1GB 4GB OCZ Reaper PC2-6400 
RAMHard DriveHard DriveOptical Drive
2GB Corsair XMS2 PC2-6400 Crucial C300 64GB SSD 2TB Samsung Spinpoint F4 Sony Super Multi 
OSMonitorPowerCase
Windows 7 Professional x64 SP1 Asus VH202T 20'' 1600x900 SeaSonic M12II 620W Cooler Master Centurion 5 
Mouse
Razor Abyssus 
CPUMotherboardGraphicsRAM
Core i5-520M Lenovo 2522BF3 NVIDIA® Quadro® NVS3100M  Ramaxel Technology 4Gb DDR3 
Hard DriveOptical DriveOSMonitor
Samsung SSD 128GB 1.8" Micro SATA  hl-dt-st dvdram gu10n Windows 7 Enterprise (64-bit) 14.1" WXGA (1280x800) display, anti-glare, LED ... 
Power
9-cell plus Slice battery 
  hide details  
Reply
post #3 of 5
Thread Starter 
No, it would ask you what you want the document to say, and then create the document.
It's supposed to be for a sort of "bug report"
Red Thunder
(19 items)
 
  
CPUMotherboardGraphicsRAM
i5 2500k ASRock Fatal1ty Z68 Pro3 Gen3 Diamond Multimedia HD 5970 G.Skill Ripjaws X 8GB 
Hard DriveHard DriveOptical DriveCooling
OCZ Solid 3 60GB Seagate Barracuda 7200.9 160GB Lite-On iHAS424 Sunbeam Twister 120 
OSMonitorKeyboardPower
Windows 7 Ultimate 64-bit Samsung SyncMaster E1920X Logitech K120 Corsair GS700 
CaseMouseMouse PadAudio
NZXT Phantom Razer Naga None Realtek ALC892 
OtherOtherOther
Behringer Xenyx 502 Lepai LP-2020A+ Dayton Audio B652 
  hide details  
Reply
Red Thunder
(19 items)
 
  
CPUMotherboardGraphicsRAM
i5 2500k ASRock Fatal1ty Z68 Pro3 Gen3 Diamond Multimedia HD 5970 G.Skill Ripjaws X 8GB 
Hard DriveHard DriveOptical DriveCooling
OCZ Solid 3 60GB Seagate Barracuda 7200.9 160GB Lite-On iHAS424 Sunbeam Twister 120 
OSMonitorKeyboardPower
Windows 7 Ultimate 64-bit Samsung SyncMaster E1920X Logitech K120 Corsair GS700 
CaseMouseMouse PadAudio
NZXT Phantom Razer Naga None Realtek ALC892 
OtherOtherOther
Behringer Xenyx 502 Lepai LP-2020A+ Dayton Audio B652 
  hide details  
Reply
post #4 of 5
Quote:
Originally Posted by White Fire View Post

No, it would ask you what you want the document to say, and then create the document.
It's supposed to be for a sort of "bug report"
ok, well this code will prompt the user for input and then append it to a text file.
Code:
set INPUT=
set /P INPUT=Type input: %=%
echo %input%>> file.txt
Fractal Design
(15 items)
 
775 4 life
(15 items)
 
 
CPUMotherboardGraphicsRAM
Intel i7 2600K Biostar TP67XE NVidia GTX 570 Crucial Ballistix 
Hard DriveHard DriveCoolingOS
Crucial C300 RealSSD SDD Samsung F4 2TB Noctua NH-D14 Windows 7 Professional x64 
MonitorMonitorKeyboardPower
Asus VH202T 20'' 1600x900 Acer P244W 24" 1920 x 1080 Apple Keyboard with Numeric Keypad SeaSonic M12II 620W 
CaseMouseAudio
Fractal Design Define XL Titanium Grey Razor Abyssus Creative Sound Blaster X-FI Xtreme Gamer 
CPUMotherboardGraphicsRAM
Intel X3350 3.2Ghz @ 1.25v Gigabyte-GA-P35-DS3L (rev 2) XFX 4870 1GB 4GB OCZ Reaper PC2-6400 
RAMHard DriveHard DriveOptical Drive
2GB Corsair XMS2 PC2-6400 Crucial C300 64GB SSD 2TB Samsung Spinpoint F4 Sony Super Multi 
OSMonitorPowerCase
Windows 7 Professional x64 SP1 Asus VH202T 20'' 1600x900 SeaSonic M12II 620W Cooler Master Centurion 5 
Mouse
Razor Abyssus 
CPUMotherboardGraphicsRAM
Core i5-520M Lenovo 2522BF3 NVIDIA® Quadro® NVS3100M  Ramaxel Technology 4Gb DDR3 
Hard DriveOptical DriveOSMonitor
Samsung SSD 128GB 1.8" Micro SATA  hl-dt-st dvdram gu10n Windows 7 Enterprise (64-bit) 14.1" WXGA (1280x800) display, anti-glare, LED ... 
Power
9-cell plus Slice battery 
  hide details  
Reply
Fractal Design
(15 items)
 
775 4 life
(15 items)
 
 
CPUMotherboardGraphicsRAM
Intel i7 2600K Biostar TP67XE NVidia GTX 570 Crucial Ballistix 
Hard DriveHard DriveCoolingOS
Crucial C300 RealSSD SDD Samsung F4 2TB Noctua NH-D14 Windows 7 Professional x64 
MonitorMonitorKeyboardPower
Asus VH202T 20'' 1600x900 Acer P244W 24" 1920 x 1080 Apple Keyboard with Numeric Keypad SeaSonic M12II 620W 
CaseMouseAudio
Fractal Design Define XL Titanium Grey Razor Abyssus Creative Sound Blaster X-FI Xtreme Gamer 
CPUMotherboardGraphicsRAM
Intel X3350 3.2Ghz @ 1.25v Gigabyte-GA-P35-DS3L (rev 2) XFX 4870 1GB 4GB OCZ Reaper PC2-6400 
RAMHard DriveHard DriveOptical Drive
2GB Corsair XMS2 PC2-6400 Crucial C300 64GB SSD 2TB Samsung Spinpoint F4 Sony Super Multi 
OSMonitorPowerCase
Windows 7 Professional x64 SP1 Asus VH202T 20'' 1600x900 SeaSonic M12II 620W Cooler Master Centurion 5 
Mouse
Razor Abyssus 
CPUMotherboardGraphicsRAM
Core i5-520M Lenovo 2522BF3 NVIDIA® Quadro® NVS3100M  Ramaxel Technology 4Gb DDR3 
Hard DriveOptical DriveOSMonitor
Samsung SSD 128GB 1.8" Micro SATA  hl-dt-st dvdram gu10n Windows 7 Enterprise (64-bit) 14.1" WXGA (1280x800) display, anti-glare, LED ... 
Power
9-cell plus Slice battery 
  hide details  
Reply
post #5 of 5
Thread Starter 
Quote:
Originally Posted by travesty View Post

ok, well this code will prompt the user for input and then append it to a text file.
Code:
set INPUT=
set /P INPUT=Type input: %=%
echo %input%>> file.txt
Precisely what I was looking for, thanks. Rep
Red Thunder
(19 items)
 
  
CPUMotherboardGraphicsRAM
i5 2500k ASRock Fatal1ty Z68 Pro3 Gen3 Diamond Multimedia HD 5970 G.Skill Ripjaws X 8GB 
Hard DriveHard DriveOptical DriveCooling
OCZ Solid 3 60GB Seagate Barracuda 7200.9 160GB Lite-On iHAS424 Sunbeam Twister 120 
OSMonitorKeyboardPower
Windows 7 Ultimate 64-bit Samsung SyncMaster E1920X Logitech K120 Corsair GS700 
CaseMouseMouse PadAudio
NZXT Phantom Razer Naga None Realtek ALC892 
OtherOtherOther
Behringer Xenyx 502 Lepai LP-2020A+ Dayton Audio B652 
  hide details  
Reply
Red Thunder
(19 items)
 
  
CPUMotherboardGraphicsRAM
i5 2500k ASRock Fatal1ty Z68 Pro3 Gen3 Diamond Multimedia HD 5970 G.Skill Ripjaws X 8GB 
Hard DriveHard DriveOptical DriveCooling
OCZ Solid 3 60GB Seagate Barracuda 7200.9 160GB Lite-On iHAS424 Sunbeam Twister 120 
OSMonitorKeyboardPower
Windows 7 Ultimate 64-bit Samsung SyncMaster E1920X Logitech K120 Corsair GS700 
CaseMouseMouse PadAudio
NZXT Phantom Razer Naga None Realtek ALC892 
OtherOtherOther
Behringer Xenyx 502 Lepai LP-2020A+ Dayton Audio B652 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming