Questions tagged [rmdir]

The `rmdir` command is a Linux, DOS and Windows command used to remove a directory or folder.

The rmdir command is a Linux and Windows command used to remove a directory or folder.

Manpage for rmdir.

152 questions
2
votes
1 answer

ruby 1.9 3 with passenger 3.0.12 - Tempfile causes 'No such file or directory' *.lock when trying to rmdir

i think ruby 1.9.3 is unable to create tempfile in /tmp directory. Problem error message: Status: 500 Internal Server Error No such file or directory /tmp/RackRewindableInput20121031-8340-1qko694.lock /lib/ruby/1.9.1/tempfile.rb:346:in rmdir' …
neel
  • 21
  • 2
2
votes
2 answers

Windows equivalent of rm -rf [Don't want to delete parent directory]

I am doing the same as described here i.e. In my batch file, I am using rmdir E:\docs\music /S /Q to delete all the content including sub directories too but it is removing parent directory music also which I don't want.Do I need to run mkdir…
ravi
  • 6,140
  • 18
  • 77
  • 154
2
votes
1 answer

PHP mkdir not working after rmdir

I have a chunk of code that tests if a directory exists, deletes it if it exists, and creates a new directory over it. It should be fairly simple. if(is_dir($directory)){ $files = new RecursiveIteratorIterator( new…
Joshua Welker
  • 547
  • 1
  • 9
  • 20
1
vote
2 answers

PHP recursive file& folder delete function: 'Directory not empty' error message

I'm trying to create function which removes all file and directories on webhosting excluding given files and folders arrays function cleanUp($exdirs, $exfiles){ $it = new RecursiveIteratorIterator( new RecursiveDirectoryIterator('.'), …
heron
  • 3,611
  • 25
  • 80
  • 148
1
vote
0 answers

Window Batch file to keep some specific folders and delete the rest

I have 100+ folders, and I want to run a batch file to keep certain folders like 10 folders with different names based on my list. Example I have folders like 1FL-12 1FL-44 1FL-86 2FL-95 2FL-73 2FL-25 3FL-52 4FL-53 4FL-35 5FL-85 I am trying to keep…
Nir14
  • 11
  • 2
1
vote
1 answer

Keep 2 specific folders using RMDIR

As part of my job I need to remove files from computers that are being shipped over seas, this task is done several times a week and can be scripted, however I am terrible with script, I am in no means a coder of any sort. My issue is that I need to…
1
vote
1 answer

Deleting a folder structure from java

I am finding an issue while deleting a folder from Java. I used following commands without luck. However, I am able to delete folder through command prompt using Windows 8.1: String command1="rd /s /q"+Path; String command2="rmdir /s /q \""+Path+…
FX_Programmer
  • 115
  • 2
  • 11
1
vote
1 answer

rmdir() bug with particular filename? Permission denied

First, let's get these out of the way: There are no open handles on the directory. There are no files in the directory. chmod ing the permissions to 0777 does not prevent the error. the directory name is correct. Now then, here's my problem. …
JakeParis
  • 11,056
  • 3
  • 42
  • 65
1
vote
0 answers

Exist, Rmdir and %errorlevel% in batch Windows

I don't think that my question is duplicate to batch: Exit code for "rd" is 0 on error as well because I've tried everything from that answer and it didn't help (as you can see on screenshots below). Let's say I want to delete directory with files…
Rudean
  • 255
  • 3
  • 13
1
vote
1 answer

NSIS set 'Space required' in uninstaller

My uninstaller shows 0 Kb for 'Space required' on the components page, because I have no File operations inside my Sections. But I'm deleting some files and directories using RMDir in my Sections, so I want to the 'Space required' to show the sum of…
clic
  • 365
  • 1
  • 13
1
vote
1 answer

octave mkdir fails after recursive rmdir

I have a code that creates a subfolder but first removes the subfolder if it already existed. I am using Octave3.6.4_gcc4.6.2 for MinGW on a Win7 pro machine. I noticed that mkdir fails if the subfolder existed and contained several files. It seems…
JackOTrade
  • 45
  • 6
1
vote
1 answer

Delete folder and files in PHP

I have a question about the little code snippet below. At the moment I use the first code snippet and it runs perfectly. But wouldn't the second code be a better way to delete the folder and files in it? My variable $target is everytime a path to…
tobias s
  • 120
  • 2
  • 9
1
vote
1 answer

Is it possible to remove multiple directories at once on powershell?

If you create multiple directories within each other using Powershell is it possible to remove them all at once? The rmdir command removes them one at a time, but I was wondering if there was a more simple way. Thank you! I'm just learning to code…
Althea
  • 11
  • 2
1
vote
1 answer

Rmdir command not working after copying war file using windows batch

I write windows batch file for copying war file. Then I remove the directory that contain war file but the directory does not disappear. See my command copy D:\target\*.war D:\new_target IF exist D:\target ( rmdir D:\target /s /q ) But my…
Sai Ye Yan Naing Aye
  • 6,622
  • 12
  • 47
  • 65
1
vote
2 answers

autoconfir rmdir

i am running a long matlab script and it should run when i am not around. part of the script cleans up previous created folder structures (temp data). rmdir('dir','s'); however matlabs rmdir will ask me the following: remove entire contents of dir?…
Sebastian Flückiger
  • 5,525
  • 8
  • 33
  • 69