I am trying to delete the file using adb command. But the file contain spaces. So adb command throws an error after reading half of the file name till space. Is there a way to overcome this issue. I am executing following adb command
When I execute
adb shell rm /sdcard/samsung_Nexus S_converter.xml
Error message: rm failed for /sdcard/samsung_Nexus, No such file or directory
How ever when I execute:
adb shell rm /sdcard/samsung_Nexus_S_converter.xml
File deletion is successful
I searched for solution for this, if there is any workaround. How ever I couldnt find any.
Did you tried escaping the space
adb shell rm /sdcard/samsung_Nexus\ S_converter.xml
By me it wasn't enough to escape spaces with backslashes:
For some reason I also had to surround the path with '':
While surrounding without escaping didn't work:
Since you are using command line, you need to know that spaces must be escaped by using (backslash before the special character like "space"), so, in your case this should work too:
Hope it helps!
Regards!