Create directory

bartwyckmans
bartwyckmans Member Posts: 39
edited 2003-09-10 in Navision Financials
Hi,

anyone know how to create a directory whitin Attain?

Thanks.

Comments

  • Torben_R.
    Torben_R. Member Posts: 99
    Try to read the help for SHELL

    Example
    Here is an example of how you can use the SHELL function:

    SHELL('c:\joe\myprog.exe', 'arg1', 'arg2');

    This statement executes a program named myprog.exe in the directory c:\joe. There are two arguments, arg1 and arg2, which are passed to the function. To call the DOS command DIR, you would use this code:

    CommandProcessor := 'c:\command.com'; // Windows 95 & Windows 98
    CommandProcessor := 'c:\windows\system32\cmd.exe'; // Windows 2000 & Windows XP

    Argument := '/c';
    DOSCommand := 'dir';
    SHELL(CommandProcessor, Argument, DOSCommand);
  • bartwyckmans
    bartwyckmans Member Posts: 39
    thank you :lol:
  • eromein
    eromein Member Posts: 589
    This is not the attain forum. It's important.... Please not that the shell command in 3.60 is buggy... woun't work.
    "Real programmers don't comment their code.
    If it was hard to write, it should be hard to understand."
  • IngoRoth
    IngoRoth Member Posts: 6
    Add the following Var in your Codeunit.

    Name DataType Subtype Length
    rtFileSystem Automation
    'Microsoft Scripting Runtime'.FileSystemObject

    Add these Line:

    CREATE( rtFileSystem ) ;
    rtFileSystem.CreateFolder( 'C:\Whatyouwant' ) ;

    Tip:
    Press F5 in Design-Mode to see many Other Direcory/File-Functions
    Ingo Roth