Re: renaming a directory thru DOS on winxp

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: R. C. White (RCWhite_at_msn.com)
Date: 03/04/04


Date: Thu, 4 Mar 2004 11:39:18 -0600

Hi, Liz.

Your problem may be with the spaces in your pathname, rather than with the
Move command. To handle LFNs (Long File Names) in either MS-DOS or in the
DOS emulator, also called the Command Prompt, in WinXP, you must enclose the
entire pathname in quotes. Even short filenames are considered LFNs if
there is a space anywhere in the pathname or filename. Also, you must
include the new path, if different from the original.

Try this:
move "c:\program files\network associates\common framework" commframold

to simply rename it in the same place, or:
move "c:\program files\network associates\common framework" c:\commframold

to move it to C:\ and rename it there.

Different rules apply when moving a file from one volume to another, as
opposed to moving from folder to folder within a single volume. To move to
a different volume, the entire file must actually be copied to the new
location, then deleted from the old. To move within a volume, all that must
be done is to create the directory entry in the new folder, then delete it
from the old; the file/folder contents remain where they were.

In the "DOS" window, type any command followed by /? to see a mini-Help file
listing the switches available with that command: Move /?, or Ren /?

RC

-- 
R. C. White, CPA
San Marcos, TX
rc@corridor.net
Microsoft Windows MVP
"liz" <anonymous@discussions.microsoft.com> wrote in message
news:6e8001c40204$30925e40$a501280a@phx.gbl...
> I am trying to rename a directory on my c:\ thru dos
> commands (i am creating a batch file)
>
> Microsoft recommends the "move command"
>
> if I move a directory at the root of c:\ it works,
> however if the directory is lengthly like the following I
> get an error.  Can anyone shed some light on this;
>
> I want to rename or move the common framework directory
> from the path below, to the same directoy only rename the
> directory commframold
>
> c:\program files\network associates\common framework


Relevant Pages

  • Re: renaming a directory thru DOS on winxp
    ... Add the /s switch and it will ... > You wouldn't know the command for deleting a directory ... > framework" commframold ... >>to simply rename it in the same place, ...
    (microsoft.public.windowsxp.basics)
  • Re: renaming a directory thru DOS on winxp
    ... You wouldn't know the command for deleting a directory ... framework" commframold ... >to simply rename it in the same place, ... >opposed to moving from folder to folder within a single ...
    (microsoft.public.windowsxp.basics)
  • Re: Attribute/Base Class Naming
    ... I wouldn't say that it is bad practice, but perhaps you can rename the ... SequenceCommand to be more reflective of what you are trying to do. ... example, "MY_COMMAND" is some sort of key, or command text, right? ... which control how the command is used by the framework. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: -command scope
    ... I meant command as in a Tcl/Tk command not the -command option to a ... Just about every widget man page ... whose name is pathName. ... However if you rename the created command, ...
    (comp.lang.tcl)
  • Re: Great SWT Program
    ... a good tutorial on Unix CLI tools? ... command there, ... then rename everything in the search scope with the CLI, ... I'd have to boot up a Windows system and try stuff, ...
    (comp.lang.java.programmer)