Remove all files, folders and their subfolders with php [duplicate]. I need a script which can remove a whole directory with all their subfolders, files and etc. I tried with this function which I found in internet before few months ago but it not work completely. For the test I use a unpacked archive of prestashop and I try to delete.

Hiya, I'm trying to delete files and subfolders on remote machines using cmd. I don't have exclusive rights to do everything I'd like to so I've only been able to come up with using cmd as an alternative. I did try a few things like powershell but ran into permission issues. I'm open to suggestions to try out.

I have found something to delete everything within the folders, however not the folders themselves. This is what I have so far: del /s /q ComputerName c$ windows ccmcache *.* So now I have a bunch of empty folders and would like them to all go away also ^_^; I haven't had a lot of luck finding anything on the removal of folders other than the rmdir but that doesn't seem to apply for invoking remote commands?

Any insight you all can provide would be much appreciated! Batchfile rmdir /s /q server share subfolder FOLDERTODELETE The above command deleted the 'FOLDERTODELETE' and all contents contained within. I am not familiar with the desktop centrals remote command prompt thingy, so I cannot provide information on that at this point.

I am running via the built-in command prompt (cmd.exe) in all of my examples/tests. Does the software work well with scripts more than commands? If so, perhaps just save the command as a.bat file and use that? I know what works for me, and if I had to do the same thing on a lot of machines, I would leverage PSExec. Ah thanks I looked at the psexec thing as an option too but couldn't get it to work I forgot what happened or why it didn't workout I think eventually I was just like ugh, and wanted to try something else after a while. Knope, I noticed in your entry you had rmdir reference a local directory- if I write it as rmdir /s /q/ to a remote directory (I'm using desktop centrals remote command prompt thingy) will it work? I tried a couple of entries for remote request which was basically the same line as the del request but I just put rmdir in its place.

Arhiv proshivok dlya televizorov samsung. It did not seem to recognize what I was asking =. Batchfile rmdir /s /q server share subfolder FOLDERTODELETE The above command deleted the 'FOLDERTODELETE' and all contents contained within. I am not familiar with the desktop centrals remote command prompt thingy, so I cannot provide information on that at this point.

I am running via the built-in command prompt (cmd.exe) in all of my examples/tests. Does the software work well with scripts more than commands? If so, perhaps just save the command as a.bat file and use that? I know what works for me, and if I had to do the same thing on a lot of machines, I would leverage PSExec.

Be carefull with tese commands! Its deletes hidden folder and subfolder and thier hidden files aswell without warnings. Here it is works in vb6 and also in vb.net Private Sub Command3_Click() Dim fso As Object Set fso = CreateObject('scripting.filesystemobject') If fso.folderexists('c: test') Then fso.deletefolder ('c: test') End If End Sub -----Original Message----- Hi, I am storing all my database backup files in one hidden folder. I need to delete that folder and its contents every time when the user click on backup cmdbutton. Remdir() is not working. Can anybody help?

Regards madhu. This code works better it remove first the readonly attribute of the files who make block the deleting of the directory Private Sub Command5_Click() 'if yourbackup files are readonly you first have to 'remove this attribute. Unhide the directory first then delete all files then delete the folder in that order. John Warner From: Swapna Rachakonda via visualbasic-l [mailto:visualbasic-l@Groups.ITtoolbox.com] Sent: Saturday, December 13, 2008 11:57 AM To: john Subject: RE:[visualbasic-l] how to delete Hidden folder and its contents hey try with dos delete command. I think its help u -----Original Message----- Hi, I am storing all my database backup files in one hidden folder. I need to delete that folder and its contents every time when the user click on backup cmdbutton. Remdir() is not working.