|
Answer» I'm trying to use the following command, to move a directory (folder), from my external HD, to my internal (C:) Drive's Desktop.
I used the command:
move "G:\Test" "C:\Documents and Settings\Owner\Desktop"
but, I get an 'Access is denied.' message.
I can move files from within the Test folder with:
move "G:\Test\TestFile.txt" "C:\Documents and Settings\Owner\Desktop"
This works fine. TestFile.txt GETS moved to my Desktop with no 'Access is denied' message.
I tried to give myself full control to the folder with the CACLS command.
I did this:
cacls "G:\Test" /e /c /g Owner:f
and it reported:
processed dir: G:\test
So it supposedly gave me full control to that folder, but when I use:
move "G:\Test" "C:\Documents and Settings\Owner\Desktop"
it still reports the 'Access is denied.' message.
I can also use the RD command to remove the folder, with no problem. I just can't move it from one drive to the other.
I can't move it from the (G:) Drive to the (C:) Drive, or from the (C:) Drive to the (G:) Drive.
I'm sure it has SOMETHING to do with the permissions or ownership, but I'm not that experienced with using permissions to gain access to files and folders, since I have XP Home Edition, which doesn't have the Permissions tab, when you right-click folders and files.
I have to do EVERYTHING through DOS, or login through my Administrator account, which then allows me access to the Permissions tab.
I'll never buy a Home Edition of an operating system again. I want full, power-user, control.
Oh well, I didn't know enough at the time I bought the computer. Lesson learned.
This is driving me nuts. Could somebody please help?
ThanksOk, after fiddling around with this, I think I have it figured out.
I think the MOVE command, just doesn't work like I originally thought.
I thought the MOVE command would move a Folder, and all of it's files, then remove itself from it's original location, all with one command, but it doesn't, at least not drive to drive.
If I create an empty folder named 'Test', then try to move it to 'Test2', without creating an empty folder named 'Test2' folder beforehand, it just renames the 'Test" folder to 'Test2'.
For example, when I use:
move "G:\Test" "G:\Test2"
it just renames the 'Test" folder to 'Test2'.
But, if I create the 'Test2' folder beforehand, it DOES move the 'Test' folder into the 'Test2' folder, like this:
"G:\Test\Test2"
As long as I stay on the same drive, this approach works. But, if I create a folder on my Desktop named 'Test2', and try to move 'Test" from the (G:) Drive into it, I get the 'Access is denied.' message.
For example, when I use:
move "G:\Test" "C:\Documents and Settings\Owner\Desktop\Test2"
I get the 'Access is denied.' message.
So, what I came up to move a folder on one drive, to a second drive, and have it be named with the same name, is a FOUR step process.
First command to execute is:
attrib -h -r -s "G:\Test" /s /d
which unsets all of the attributes of the top folder that might hinder it from being copied.
Second is:
attrib -h -r -s "G:\Test\*.*" /s /d
which unsets all of the attributes of the subfolders and files that might hinder everything from being copied.
Third is:
xcopy /e /i "G:\Test" "C:\Documents and Settings\Owner\Desktop\Test"
which copies the top folder 'Test', all of the subfolders, and all of the files, in it.
Forth is:
rd /s /q "G:\Test"
which deletes the original 'Test' folder.
This is the only way I can seem to move a folder from one drive to another.
If there is a better way, please let me know.
Or, if my problem is access permissions, please let me know that too.
Thanks
|