22. maj 2005 - 12:44Der er
13 kommentarer og 3 løsninger
Tilføje filer til dos-bootdiskette
Først en indledning: Spørgsmålet kommer lidt længere nede:
Jeg har en gammel DOS-bootdiskette, som jeg har brugt i mange år. Den kan boote "alt" - fx har jeg aldrig oplevet, at den ikke har genkendt et cdromdrev. Bootdisketten havde selvfølgelig sin storhedstid i Win95 og -98-dagene, men jeg bruger den også på min XP-maskine, hvor jeg fortsat sværger til FAT32, fx. er det praktisk at kunne køre DOS-programmer som DELPART og KILLDISK, hvis computeren trænger til at blive "lagt ned".
move var en af revolutionerne i dos 5, så man undgik at skulle kopiere og slette, bl.a. Norton Commander havde i en del år haft et stort marked primært pga. dens evner indenfor filhåndtering (to vinduer ved siden af hinanden, mulighed for synkronisering samt flytning af filer, hvor den automatisk hånterede kopiering og sletning !-)
Specifies the location and name of the file or files you want to move. Also specifies the name of a directory you want to rename.
destination
Specifies the new location of the file, or the new name of the directory. The destination can consist of a drive letter and colon, a directory name, or a combination. If you are moving only one file, you can also specify a filename if you want to rename the file when you move it. Moving a file to an existing file overwrites the existing file. If you are moving more than one file, the destination must be a directory name.
Notes
Renaming a file while moving it
If you move only one file to a new directory, you can rename the file as you move it by specifying the new filename in the destination. However, if you move more than one file to a new directory in the same command line, you cannot specify a filename as a destination. If you specify a destination filename and the file already exists, the move command will overwrite the existing file without prompting you.
If you specify a filename when moving more than one file, you will see the following message:
Cannot move multiple files to a single file
Renaming a directory using the move command
You can rename a directory using the move command. Specify the old directory name as the file you want to move, and then specify the new directory name as the destination. You can change the directory name, but you cannot move the directory to another location in the directory tree.
For example, to rename a directory called NEW on drive C to OLD, type the following command:
move c:\new c:\old
The following command is invalid because the new directory name is not in the same location as the old directory name:
move c:\new c:\dos\new
Errorlevel parameters
If the move command successfully moved the file or files you specified, it returns an errorlevel value of 0. If there was an error in moving one or more of the files you specified, the move command returns an errorlevel value of 1.
Examples
Suppose C:\LETTERS is a directory. To move the files ED.TXT and SIGRID.TXT from the current directory to the LETTERS directory on drive C, type the following at the command prompt:
move ed.txt,sigrid.txt c:\letters
To move the BILL.TXT file from the current directory to the LETTERS directory on drive C and rename it ANN.TXT, type the following at the command prompt:
move bill.txt c:\letters\ann.txt
To rename the THISYEAR directory on drive C to LASTYEAR, type the following at the command prompt:
Ahh.. det er jo en folder du forsøger at flytte, så det kan du ikke udføre på den måde.
C:\Documents and Settings\tobrandt>move /? Flytter filer og omdøber filer og mapper.
Sådan flyttes en eller flere filer: MOVE [/Y | /-Y] [drev:][sti]filnavn1[,...] destination
Sådan omdøbes en mappe: MOVE [/Y | /-Y] [drev:][sti]mappenavn1 mappenavn2
[drev:][sti]filnavn1 Angiver placeringen og navnet på filen eller filerne, du vil flytte. destination Angiver den nye placering af filen. Destination kan består af et drevbogstav og et kolon, et mappenavn eller en kombination heraf. Hvis du kun flytter én fil, kan du desuden medtage et filnavn, hvis du vil omdøbe filen, når du flytter den. [drev:][sti]mappenavn1 Angiver den mappe, du vil omdøbe. mappenavn2 Angiver mappens nye navn.
/Y Undertrykker anmodningen om at bekræfte, at den eksisterende destinationsfil må overskrives. /-Y Medfører en anmodning om at bekræfte, at en eksisterende destinationsfil må overskrives. ----------
Du er nok nødt til at lave en xcopy /s først og derefter en deltree for at få det ønskede resultat
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.