batch file delete file using network path

March 17, 2011 at 01:25:57
Specs: Windows XP
i have a delete one sub file in the network folder. what is command to connect to share folder and can delete the file inside it by using batch file. TQ

See More: batch file delete file using network path

Report •


#1
March 17, 2011 at 03:35:49
If you can acces the admin share (admin$):

DEL /Q \\TARGETCOMPUTERNAME\c$\WINDOWS\System32\FileToBeDeleted.ext
Happy is ONE who says I am an OttoMAN.


Report •

#2
March 17, 2011 at 18:20:59
that want by admin access..

how about user that only have access to that folder for read and write privilege.
My scenario is..we have one file folder at the server and access using network path (\\xxx.xxx.xxx.xxx\Yfolder). We have to delete some files (more that 100 files that should be deleted) in Yfolder. For script to delete file can be done but to access the folder still not managed to do.

Currently my batch file only only can work for C drive... :(


Report •

#3
March 17, 2011 at 19:23:35
@echo off
net use X: \\servername\foldername
cd /d X:
::Put all your delete stuff here ..

Subhash Chandra.


Report •
Related Solutions


Ask Question