N
News
Is it possible to delete a file by copying it to the "bit bucket" or
"null device"?
Back in my youth when I live in VMS-land you could delete a file by
copying it to NL:
==========
I have written a windows service as part of an interface between two
different systems. The first system will write output into a file in a
shared folder. The server will detect the new file(s) and process
them.
If the second system is updated successfully the file is moved to a
"success" folder and if not it is move to a "failure" folder.
Eventully there will be a huge number of files in the success folder.
The source, success and failure folders are specified in a config file.
Once the user is satisified that the process is working they would
like to just delete the successfull files but still keep the option to
return to moving them to the success folder. The easiest way to do
this, without any code changes, is to just specify the success folder
as the "bit bucket" or "null device", then the copy would just send the
file off into the ether.
Mike Buchanan
"null device"?
Back in my youth when I live in VMS-land you could delete a file by
copying it to NL:
==========
I have written a windows service as part of an interface between two
different systems. The first system will write output into a file in a
shared folder. The server will detect the new file(s) and process
them.
If the second system is updated successfully the file is moved to a
"success" folder and if not it is move to a "failure" folder.
Eventully there will be a huge number of files in the success folder.
The source, success and failure folders are specified in a config file.
Once the user is satisified that the process is working they would
like to just delete the successfull files but still keep the option to
return to moving them to the success folder. The easiest way to do
this, without any code changes, is to just specify the success folder
as the "bit bucket" or "null device", then the copy would just send the
file off into the ether.
Mike Buchanan