Results 1 to 3 of 3

Thread: Copying and deleting folder trees using compiler directives

  1. #1

    Default Copying and deleting folder trees using compiler directives

    Hi,

    I can't see an easy way to delete a folder tree at compile time using
    compiler directive statements. I want to copy my files to compile from a
    network drive to my local drive, compile them there, then upload them back
    to the network to speed up the compilation time

    I figured I can use #run to run xcopy.exe to copy a folder tree, but I can't
    run "rmdir /s" to remove the folder tree, which is needed to ensure old
    files are not compiled from a previous build. Since this command is part of
    the DOS shell it doesn't have an associated .EXE filename to specify in the
    #run dialog and so it seems the command doesn't get executed. The rmdir
    command line I need to run takes the path to delete from a compiler variable
    so I can't use a pre-written batch file. Also, I can't create the batch file
    dynamically with the correct pathnames since this isn't possible using
    compiler directives

    Does anybody have any ideas for this?

    Regards,

    Jeff Botwood
    Data Design Services

  2. #2

    Default Re: Copying and deleting folder trees using compiler directives

    Hi Jeff,

    Perhaps "cmd rmdir /s" in #run works?

    Friedrich

  3. #3

    Default Re: Copying and deleting folder trees using compiler directives

    Thanks Friedrich, you got me looking in the right place, just need to add a
    /C switch to get CMD to run the relevant command

    CMD /C RMDIR /S does the job

    Jeff

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •