Re: cmd.exe rename of root directory fails with file not found

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I suspected that there might be a simple explanation like this. Whenever I
strike an issue that appears to defy all logic and experience I reduce it
down to the simplest possible form, much like the test commands I gave you.
This technique will either reveal that my reasoning was flawed or it will
give me a pointer to what might actually cause the problem.


"Joe" <Joe@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:826AF967-C927-43D8-AD8D-6A53830F85FD@xxxxxxxxxxxxxxxx
Your response made me look deeper. It turns out the answer is simple but
at
the same time easy to miss.
The script manages up to 6 backup directories but normally only uses 5
which
allows for space to backup even if problems are encountered...such as this
one.
If more than 5 directories already exist, the oldest one is deleted using
RD
which worked fine. Dir F: /AD /B /ON > folders.txt also worked fine
further
throwing me off.
The theory is to always backup to the oldest directory but to rename it to
the current date thereby making it the newest directory but only updating
the
changes for the sake of performance.
The problem is created during the first 5 backups as the new directories
are
created by Robocopy which by default SETS THE HIDDEN ATTRIBUTE TO ON.
Since
the command functions rename/ren, move and even simple dir have no
overriding
parameters they will exit the function when they encounter the H+.
Thanks for making me think again.
I hope this helps someone else as well.
--
J8034


"Pegasus (MVP)" wrote:


"Joe" <Joe@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:842D9315-11E7-42D2-AACA-499FA934DAE2@xxxxxxxxxxxxxxxx
rename/ren & move fail on a dynamic disk with file not found error.
This
error came to light while debugging a command script backup procedure
using
robocopy.
System: Windows 2003 SBS SP2, user Administrator. Interestingly these
commands work on a basic disk. Rename functions also work correctly
using
windows explorer. Is there a bug in cmd.exe with regard to dynamic
disks
or
are these function not defined for dynamic disks? Is there a work
around?
I have not tried other forms of scripting at this point.
--
J8034

I find this very, very hard to believe. Did you try some basic commands
such
as these:
md Test1
ren Test1 Test2
dir > dir1.txt
ren dir1.txt dir2.txt
move dir2.txt Test2
According to you, four of these five commands should fail. Do they? Do
they
fail while you're in Safe Mode too? What is the error message in each
case?





.



Relevant Pages

  • Re: Locating files with accents
    ... Is there any way to search these files so that I can rename ... What backup ... Type these commands: ... notepad c:\Accent.txt ...
    (microsoft.public.windowsxp.general)
  • Re: Backing up my settings and files - noob alert :)
    ... >find that I need to know how to backup my data in case it happens again. ... we simply boot using a floppy, connect to the file server, and pour the ... you'll have to run both those commands as root. ... Access: Sun Jan 30 18:38:32 2005 ...
    (linux.redhat)
  • Re: Backing up my settings and files - noob alert :)
    ... >find that I need to know how to backup my data in case it happens again. ... we simply boot using a floppy, connect to the file server, and pour the ... you'll have to run both those commands as root. ... Access: Sun Jan 30 18:38:32 2005 ...
    (alt.os.linux.redhat)
  • Re: Problems Backing Up
    ... commands, and when something goes wrong, you find it more difficult to hunt down the problem. ... > I didnt have time last night to continue my exploration of the BACKUP ... >> Tibor Karaszi, SQL Server MVP ...
    (microsoft.public.sqlserver.server)
  • Re: Bash script clobbers something vital (lucid)
    ... At first blush, I'd say you need to check the inputs more carefully - ... If you can reduce the magnitude of the backup while you debug, ... If you know what commands worked, ... did not fail, since they left files on the backup volume. ...
    (Ubuntu)