|
Answer» I need to check for a folder called data, which is in the same area as the batch file. If it doesn't exist i need the folder 'data' to be created.
I have TRIED this so far, with no success: Code: [Select]IF NOT EXIST data\. ( > data\. ) Code: [Select]if exist data ( md data ) Try that.Code: [Select]if NOT exist data ( md data )
FIXED, Thanks. Yeah, my bad. I forgot the NOT.
Quote from: Carbon Dudeoxide on June 07, 2008, 03:27:45 AM Yeah, my bad. I forgot the NOT.
No Worries, Thanks. And What Does MD Do?MD is pretty much the same as MKDIR. They both create directories (A.K.A, folders)Quote from: Carbon Dudeoxide on June 07, 2008, 03:32:34 AMMD is pretty much the same as MKDIR. They both create directories (A.K.A, folders)
OKAY, Thanks, Your A Big Help. No problem. Glad to help.
One thing I should ADD (if you didn't already know this), In Command Prompt, if you TYPE command /?, it will tell you what the command is and what it does.
Example: QuoteC:\Documents and Settings\Brian> MD /? Creates a directory.
MKDIR [drive:]path MD [drive:]path
If Command Extensions are enabled MKDIR changes as follows:
MKDIR creates any intermediate directories in the path, if needed. For example, assume \a does not exist then:
mkdir \a\b\c\d
is the same as:
mkdir \a chdir \a mkdir b chdir b mkdir c chdir c mkdir d
which is what you would have to type if extensions were disabled. Quote from: Carbon Dudeoxide on June 07, 2008, 03:37:39 AMNo problem. Glad to help.
One thing I should add (if you didn't already know this), In Command Prompt, if you type command /?, it will tell you what the command is and what it does.
Example: QuoteC:\Documents and Settings\Brian> MD /? Creates a directory.
MKDIR [drive:]path MD [drive:]path
If Command Extensions are enabled MKDIR changes as follows:
MKDIR creates any intermediate directories in the path, if needed. For example, assume \a does not exist then:
mkdir \a\b\c\d
is the same as:
mkdir \a chdir \a mkdir b chdir b mkdir c chdir c mkdir d
which is what you would have to type if extensions were disabled. Thanks Brian Hehe, no problem Jacob.
|