Products > Computers

Windows directory equivalent of null?

(1/2) > >>

daqq:
Hello,

I'm trying to trick a piece of software that creates a specific folder structure to not create certain folder - or at least create them somewhere where they can be ignored.

The software in question can have the paths to the output directories for the individual blocks configured, but all of them are mandatory. So all of the outputs will be created, but to not clutter up the output directory (or at least not to have to manually remove the output) I would like to only have some of the output products there.

Ideally I am thinking that I would set the output paths properly for the desired output products and set the output path for the not desired output as "TRASH" and it would create it directly in the trash folder. I can use the C:\$RECYCLE.BIN as the output, but I am not sure if that works regardless of the language variation/regional settings of the Windows in question.

Is there any "%TRASH" "%NULL" directory I can use for this?

Thanks,

David

artag:
Is it possible to attempt to create them in a directory to which the user has no write permission ? Or will that cause it to error ?

JeremyC:

--- Quote from: daqq on January 23, 2023, 12:53:17 pm ---Hello,

I'm trying to trick a piece of software that creates a specific folder structure to not create certain folder - or at least create them somewhere where they can be ignored.

The software in question can have the paths to the output directories for the individual blocks configured, but all of them are mandatory. So all of the outputs will be created, but to not clutter up the output directory (or at least not to have to manually remove the output) I would like to only have some of the output products there.

Ideally I am thinking that I would set the output paths properly for the desired output products and set the output path for the not desired output as "TRASH" and it would create it directly in the trash folder. I can use the C:\$RECYCLE.BIN as the output, but I am not sure if that works regardless of the language variation/regional settings of the Windows in question.

Is there any "%TRASH" "%NULL" directory I can use for this?

Thanks,

David

--- End quote ---

I'm assuming you meant /dev/null in UNIX/Linux. In MS Windows/DOS equivalent of /dev/null is NUL (just single L).
I recall few years ago I was converting a Linux program written in C to Windows and I used gcc compiler. Replacing /dev/null with nul worked for me.

Example:

rdl:
Yeah, I'd just try write protecting whichever location you don't want it to write to and see how badly it fails.

SiliconWizard:
https://stackoverflow.com/questions/313111/is-there-a-dev-null-on-windows

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod