Computers & Internet Logo

Related Topics:

Nizam Posted on Mar 03, 2008

Dos Problem Hi.. I have run a copy command in dos eg: c:\ copy *.* c:\test (NB! the directory test did not exist at the time of the copy) The data copied itself to a file called test.file. How can I retrieve the data from test.file and copy it under a folder called test! If you type test.file in dos, all the information shows up under the file. Thank you kindly Nizam

  • Nizam Mar 04, 2008

    thanks for your help, really appreciate it!!

×

2 Answers

Anonymous

Level 1:

An expert who has achieved level 1.

MVP:

An expert that got 5 achievements.

Governor:

An expert whose answer got voted for 20 times.

Hot-Shot:

An expert who has answered 20 questions.

  • Contributor 37 Answers
  • Posted on Mar 04, 2008
Anonymous
Contributor
Level 1:

An expert who has achieved level 1.

MVP:

An expert that got 5 achievements.

Governor:

An expert whose answer got voted for 20 times.

Hot-Shot:

An expert who has answered 20 questions.

Joined: Jan 27, 2008
Answers
37
Questions
0
Helped
14875
Points
73

Shane67 did have the md and cd commands correct. However, your problem now is that DOS combined all your files into one when you used the copy command the first time.

Do you still have the original files you were backing up? If so, the easiest solution is to make your directory, run copy *.* c:\test\ and then delete the test.file as you won't need it anymore.

If you don't have the originals, and only have the test.file, you're in trouble. There is no automated way to split that file into the original files as DOS saved neither the filenames nor any information on where one file ended and the next began. If they're all plain text, you can type edit test.file to view it. Once in there, delete everything that isn't part of the first file, then click File and Save As and specify the first file name. Then you'll have to repeat the process for each other file that was copied into test.file. Just make sure you don't save any of them over test.file, or you'll lose the data that's in it.

If they weren't plain text, there's not really any way to break them up properly.

-John

Anonymous

Level 1:

An expert who has achieved level 1.

  • Contributor 2 Answers
  • Posted on Mar 04, 2008
Anonymous
Contributor
Level 1:

An expert who has achieved level 1.

Joined: Mar 04, 2008
Answers
2
Questions
0
Helped
256
Points
1

If you are only trying to move your data file, then create the new directory using the cd command e.g.  cd test.  Then move the file to the new directory either using the move command or the copy command eg. copy test.file c:\test\test.file
Alternatively you should try using the old text editor program in dos to load your file and then save to the directory of  your choice.   good luck
shane67

  • Anonymous Mar 04, 2008

    Nizam




    correction to prior comment.  the command to create your directory is md, not cd.  cd is the command you will use to change to that directory after you create it, eg.  'md test', then type "cd test" to enter that directory and create or move files to it.  sorry, haven't used dos since the 80's but still have some memories of how to work in it.  hope that helps.



×

Ad

Add Your Answer

×

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

0helpful
1answer

Where i can find the controls like command button and how can i find its code ?

dos commands
click start run you have to type cmd then type something in then press enter eg: regedit will take you into the registry or chkdsk/f is the check disk utility this is called DOS there are lots of dos commands to fix a computer
in xp
hope this helps
tip

How to hide files using the Attrib command

Attrib is a DOS command that sets or displays various file attributes. One of those attributes is the Hidden attribute, which determines whether or not a file can be viewed in a directory under normal circumstances. With the Attrib command, you are able to hide or show any non-system file, as well as view any file's current attributes.

To use Attrib, you must be at the DOS command prompt. In Windows XP, Vista, and 7, you can open a command prompt window by either typing "cmd" into the Run bar or by browsing to the Command Prompt (Start menu > All Programs > Accessories > Command Prompt). In Vista or 7, you can also type "cmd" into the Search bar.

The syntax for using Attrib to hide a file is as follows:

attrib <path><filename> +h

If you are currently in the directory where the file is located, you can omit typing the path. And since DOS is not case sensitive, you can use either upper or lowercase letters, or both.

If you later want to make that same file visible again, just type:

attrib <path><filename> -h

To view the attributes of all of the files in the current directory (even hidden files), type "attrib" by itself. Keep in mind that hiding a file will make it harder to find, but it does not by any means make it impossible. If you have sensitive or confidential data that should not be viewed by other users, protect it using encryption, permissions, and a strong user account password.
on May 30, 2010 • Computers & Internet
0helpful
1answer

How to install windows xp sp2 by using dr-dos

1. Check your BIOS to be sure your computer will boot from a CD. Enter the BIOS setup by pressing the "Delete" or F2 or "F12" key, or as directed at the startup screen, immediately after booting. Set the first boot device to "CDROM" or "DVDROM" instead of "hard drive" if it isn't already.

2. MS-DOS command prompt

Insert the Windows XP installation CD into your CD or DVD drive and restart the computer. When prompted, choose to start from the MS-DOS command prompt with CD support. The MS-DOS command prompt will appear in a moment.

3. Start SMARTDRIVE by typing "SMARTDRV" at the DOS prompt and pressing enter. You don't have to run SMARTDRIVE, but copying the files will be much quicker if you do. The computer will display the DOS prompt again.

4. Enter "CD I386" at the DOS prompt to change to the directory where the setup program starts.

5. Enter "WINNT" at the prompt to start Windows XP setup. The installation program will copy files to your computer and then display a message requesting to reboot.

6. Press the "Enter" key to reboot. The setup program will start again and check that your hard drive format is compatible with Windows XP. If not, it will guide you through partitioning and formatting the drive and then ask you to reboot once more.

7. Press "Enter" to reboot. The computer will restart in Windows XP mode and automatically start the Windows Setup Wizard to detect your hardware and finish the installation.

1helpful
3answers

How to create simple batch files

Creating a batch file
MS-DOS users
Microsoft Windows and other users

MS-DOS users
To create a basic batch file in MS-DOS, follow the below steps that give you an example of how to create a basic batch file.

  1. Open an MS-DOS command window or get to MS-DOS. Additional information about doing this can be found on document CHDOS.
  2. At the MS-DOS prompt, type: edit test.bat and press enter.
  3. If typed properly, you should now be in a blue screen. Within the screen, type:

    pause
    dir c:\windows
    dir c:\windows\system

  4. Once the above three lines have been typed in, click File and choose exit; when prompted to save, click "Yes." Users who do not have a mouse cursor can accomplish this same task by pressing ALT+F to access the file menu, then pressing "X" to exit, and pressing enter to save changes.
  5. Once you are back at the MS-DOS prompt, type: test and press enter. This will execute the test.bat file and begin running the file. Because the first line is pause, you will first be prompted to press a key. Once you press a key the batch file will run line-by-line; in this case, listing the files in the windows and windows\system directories.
If you wish to add more lines to this batch file you would simply type "edit test.bat" to edit the file again.
Additional information about the MS-DOS edit command can be found on our edit command page. Some versions of MS-DOS and bootable diskettes may not have the edit command; if this is the case, you would either need to obtain the edit.com file to access this file or use the copy con command.




Microsoft Windows and other users
A Windows user can still use the above MS-DOS steps if they wish to create a batch file. If, however, you're more comfortable using Microsoft Windows or your operating system, you can use any text editor, such as Notepad or Wordpad, to create your batch files, as long as the file extension ends with .bat. In the below example we use the Windows notepad to create a batch file.
  1. Click Start
  2. Click Run
  3. Type: notepad and press enter.
  4. Once notepad is open, type the below lines in the file or copy and paste the below lines into notepad.

    @echo off
    echo Hello this is a test batch file
    pause
    dir c:\windows

  5. Click File and click Save; browse to where you want to save the file. For the file name, type "test.bat", and if your version of Windows has a "Save as type" option, choose "All files", otherwise it will save as a text file. Once all of this has been done click the Save button and exit notepad.
  6. Now, to run the batch file, simply double-click or run the file like any other program. Once the batch file has completed running it will close the window automatically.
0helpful
2answers

Dos commands in linux

go to http://www.pctechguide.com/articles/gettingDedicated12.htm you will find all the commands you need in there.
0helpful
1answer

Learn dos commands

what OS u are using? If its XP or below u can see dos commands in windows directory command folder Just type all commands with a /? . eg: fdisk/? will get all available options and help.  if u need more help plz reply
0helpful
1answer

Hi i'm A ojt technician of computer and I encomtered the problem of computer the problem is system halted... what is the possible deffect of that problem. . .

it cannot find COMMAND.COM

Explanation: When you boot up DOS, you are placed at what is commonly called the "C: prompt", where you can type commands or run programs. The part of DOS that reads what you type and executes commands is called the command interpreter, which is stored in the file "COMMAND.COM". This interpreter is loaded when you start the system or when you start an MS-DOS session under Windows 95, and is also reloaded in some cases when you finish running a program. In this case, the system was unable to find COMMAND.COM and therefore halted the system.

try this
  • Make sure that COMMAND.COM is in the C:\ root directory, or if it somewhere else, that there is a line in AUTOEXEC.BAT that reads "COMSPEC=X:\PATH" where "X:\PATH" is wherever COMMAND.COM resides.
  • Edit the PATH command in your AUTOEXEC.BAT file, if you are trying to run a command in another directory that should be accessible from anywhere.
please send me a feed back if this works out thnk you.
0helpful
1answer

How do i reboot windows vista. i knwo theres a way to do it not from the CD and it returns it to how u go it out of the box. please let me know thanks

If you are using MS-DOS 6.0 or later, you can use multiple configuration menus or the CHOICE.COM program to configure your system. For more information on using these options under MS-DOS 6.0 or later, type HELP MULTI-CONFIG or HELP CHOICE at the MS-DOS command prompt and then press ENTER. To create the files to automatically restart your computer with the appropriate configuration, do the following:

Create a directory on your hard drive called C:\CONFIGS. Create the CONFIG.SYS and AUTOEXEC.BAT files you need to boot your system for HIMEM.SYS and applications that require it, with the following names: c:\configs\config.dos c:\configs\autoexec.dos Create the CONFIG.SYS and AUTOEXEC.BAT files you need to start your system for the program that conflicts with HIMEM.SYS. Any unique file extension can be used. The following example uses 386: c:\configs\config.386 c:\configs\autoexec.386 The following DEBUG script can be used to create a small executable file called REBOOT.COM. This file, when executed, will cause your system to restart. To create the file, change to the DOS directory, and type the following: debug reboot.comEnter the following information, pressing ENTER key after each line: A 100 ; Debug instruction for assemble MOV AH,0D ; Disk Reset INT 21h ; causes SmartDrv 4.x to write cache MOV AX, 40 ; set up segment addressing MOV DS,AX DS: OR BYTE PTR [17],0C ; equivalent of pressing CTRL+ALT MOV AX,4F53 ; Issue a "DEL" (53h = DEL scan code) INT 15h ; EMM386 sees this & shuts down. DS: MOV WORD PTR [72],1234 ; Set REBOOT flag to Warm-Boot (0=cold) JMP F000:FFF0 ; Execute the internal restart routine <CR> ; This line must be blank (just hit ENTER) R CX 20 ; File size to be written to disk (in hex) N REBOOT.COM ; Filename W ; Write the file to disk Q ; Quit Debug NOTE: The REBOOT.COM file created with this debug script is compatible with SMARTDrive and its write-behind cache feature. The instructions in REBOOT.COM cause SMARTDrive to write (flush) its write-behind cache to disk before the computer is rebooted.

The following commands can be used to copy and rename the configuration files to the root directory of the C drive and restart the computer. To simplify the process, you can put these commands into batch files.

To start your machine for Windows, use the following commands: copy c:\configs\autoexec.dos c:\autoexec.bat copy c:\configs\config.dos c:\config.sys reboot.com To start your machine for the 386 application, use the following commands: copy c:\configs\autoexec.386 c:\autoexec.bat copy c:\configs\config.386 c:\config.sys reboot.com
0helpful
1answer

Dos File

check your command options by typing copy /?.  I don't have access to dos anymore, but it should provide you with some solutions.  I don't think dos can extract files like a zip program.  I will need some time to think about possible solutions.  Did your original files all go into this new file?  You then lost the originals as a result?
0helpful
2answers

Printing from Dos Prompt

1. Save your text file (.txt).

2. On the command prompt navigate to that directory

3.Type "Lpr -S 192.168.1.200 -P lp text.txt"

Substitute 192.168.1.200 for your copier's ip

Substitute text.txt to filename.

 

Or you can: to print from MS-DOS apps.

1. Share the printer on a networked windows computer. Make sure you make the name MS-DOS compatible.

2. At a DOS prompt, type the following command:
"net use lpt1: \\servername\printer_share/persistent:yes"

NOTE Servername=computer name

printer_share=printers share name

 

Not finding what you are looking for?

154 views

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Grand Canyon Tech
Grand Canyon Tech

Level 3 Expert

3867 Answers

Brad Brown

Level 3 Expert

19187 Answers

Cindy Wells

Level 3 Expert

6688 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...