[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 690
  • Last Modified:

Access problem with Move and delete using cmd

hi friends,
   Im having a strange problem with my command line delete and move commands. Im trying to move a backup file from my local server to a shared drive on another server

move c:\backups\TestDB.bak \\Remoteserver\sharedfolder

i get access is denied error. if i use copy instead of move my file will be copied to the remote server.

copy c:\backups\TestDB.bak \\Remoteserver\sharedfolder


if i want to delete the backup file on my local server, im again getting the error i got earlier

del c:\BackUps\TestDB.bak

Why am i getting this error. it is very strange as im the Admin on my local machine. but still i cannot delete the file from the command line

Please help

Thanks
0
k_rasuri
Asked:
k_rasuri
1 Solution
 
Thomas WheelerCommented:
is the file in use? check by right clicking on my computer an looking in shared / open files
0
 
k_rasuriAuthor Commented:
no the file is not open..i checked it
0
 
ralmadaCommented:
The file is read-only.
Try executing this:
attrib -r c:\backups\TestDB.bak
and then try moving or deleting it.
0
 
k_rasuriAuthor Commented:
thanks guys for trying to help me...I read some where that move across volumes is not allowed. so im doing it in a 2 step process. copy the file to remote server and delete the local copy.

earlier my delete on local server didnt work. but my friend told me that even if i am adminstator on local machine, i wont be logged in as admin to cmd prompt. so right clicked on cmd script icon and logged in as admin and it is working now..

thanks again for your time
0
 
QlemoDeveloperCommented:
Uhh, Vista. Please provide OS info next time you post a question, so the experts can answer quick and correct.

BTW, move works crossing drives. Internally, it does the same as you would - first copy, after success delete the source.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now