Something can either be a file or directory, not both at the same time. There is no way to convert a file to a directory, short of deleting the file and creating a directory with the same name. What exactly are you trying to accomplish?
posted 13 years ago
If you're trying to create a new file, and (some of) the parent directory structure doesn't exist yet, you can try something like: