How to remove a directory with a name containing space and other special characters in DFC? #8264
Answered
by
sfayer
zhangxiaomei
asked this question in
Q&A
-
|
A directory "/juno/esd/reprod/J25.4.2/Reprod_test # ReProd_J25.4.2_v1 # runXXXtoXXX" was wrongly created by a user. It contains space and "#". How to delete it? |
Beta Was this translation helpful? Give feedback.
Answered by
sfayer
Jul 16, 2025
Replies: 1 comment 1 reply
-
|
Hi, If the directory is empty, please try this script from a DIRAC UI with suitable credentials (I'm not aware of any existing command line tool that can delete a directory containing a space): #!/usr/bin/env python
from DIRAC import initialize
initialize()
from DIRAC.Resources.Catalog.FileCatalog import FileCatalog
fc = FileCatalog()
print(fc.removeDirectory("/juno/esd/reprod/J25.4.2/Reprod_test # ReProd_J25.4.2_v1 # runXXXtoXXX"))Regards, |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
aldbr
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
If the directory is empty, please try this script from a DIRAC UI with suitable credentials (I'm not aware of any existing command line tool that can delete a directory containing a space):
Regards,
Simon