Create a Windows Directory

General discussion about eValid, its characteristis and applications.

Create a Windows Directory

Postby Reinaldo » Mon Mar 19, 2012 5:25 pm

Hi,

I've been looking for an evalid command that will create a windows directory. Is there something I could use? I am using the SaveRecord command and need to create a directory to put the file in. I'd rather have the directory generated by the script instead of calling a .bat file to create it.
Reinaldo
 
Posts: 2
Joined: Tue Jan 24, 2012 4:38 pm

Re: Create a Windows Directory

Postby eValid » Mon Mar 19, 2012 5:30 pm

For starters, from inside "cmd.exe" you have a "mkdir" command which is a built-in part of the COMMAND.COM interpreter.

eValid uses either "SystemCall" or "SystemCallWait" command(s) to call any known command-line executable(s). In order for a scripted playback scenario to create a directory on demand, a "mkdir" system level executable can be applied. i.e. "mkdir.exe - utility for win32"

COMMAND.COM commands will only work when interfaced from a BATCH file and associated call.

If the following list of environment factors are valid:

- existing local folder/directory references.
- executable can be found along your search path.
- permissions/rights to execute.
- invoke your system call using absolute paths where necessary.

Then, you can apply "mkdir.exe" as an executable or call a BATCH file equivalent.

Else, eValid will log "..unable to create process to run: " in error.

If you are unable to locate a compiled executable win32 utility equivalent.

You can simply create your own BATCH call, for example:

mkdir.bat (which contains)

mkdir %1


Then apply your scripted playback scenario to include:

SystemCallWait "mkdir.bat C:\\TESTDIR"


NOTE: SystemCallWait is more preferrable, so eValid waits for the new directory to be created before advancing to a subsequent action(s)...

_______________________
eValid Tech Support

--------------------------------------------------------------------------
Addendum to this post. We heard laster from Reinaldo that he found the following command sequence to create a directory/folder in Windows:

SystemCallWait "cmd /C mkdir C:\\TESTDIR"

and that this works perfectly.

The explanation of this command is: Call and wait for completion of the cmd (console window) command "mkdir C:\\TESTDIR". The /C tells cmd that the next string is the command to be executed.
eValid
 
Posts: 2396
Joined: Tue Jan 01, 2008 12:48 pm
Location: USA


Return to General Solution Topics

Design Downloaded from free phpBB templates | free website templates | Free Web Buttons