Zero byte dup file button

Hello,
in DO Vers 9 I have used the following button:

"Zero byte dup file

Copy FILE=NUL AS {file$}", which someone wrote. As stated in the forum, it will not work in DO Vers 10.

Can anybody please make this button work for DO Vers 10?

Thanks!

This will work instead...

  • If the button editor is in simple (one-line) mode, set the Run drop-down to Hide and use this as the Function:

    cmd /c copy nul {destpath$}{file$}
    


  • Alternatively, if the button editor is in advanced (multi-line) mode, paste this in:

    @runmode:hide
    cmd /c copy nul {destpath$}{file$}
    


Both things shown above are exactly the same, and one will turn into the other if you switch the button-editor between modes.

The "hide" stuff prevents a command prompt window from flashing on the screen.

BTW, although it uses cmd.exe, it seems to work fine (at least on Windows 7) with both Unicode filepaths and UNC network shares, so don't worry about them.

1 Like

it´s working !!!!!!

THANK YOU SO MUCH LEO!!!!!

Is there a newer dopus way to do it yet?

Paste empty file list might be of interest.

Similarly: FileType NEW FROMCLIPBOARD

https://www.gpsoft.com.au/help/opus12/#!Documents/FileType_Command.htm

Non-Opus way: robocopy.exe