Valhalla Legends Archive

Programming => General Programming => Topic started by: Dyndrilliac on November 27, 2003, 12:41 AM

Title: DOS Batch File Script Question
Post by: Dyndrilliac on November 27, 2003, 12:41 AM
Ok, I want to make a Batch file so when it's run, it changes the settings of the folder it's in so you can't see hidden or system files.

Can anyone help?
Title: Re:DOS Batch File Script Question
Post by: Tuberload on November 28, 2003, 04:20 AM
Since no one is answering your question I will throw in my two cents.

First I don't think you can hide system/hidden files in just a specific folder, but I honestly do not know. Second, batch scripts are very simple to learn and use so I would recommend finding a manual or something and trying to figure it out on your own.
Title: Re:DOS Batch File Script Question
Post by: Hostile on November 28, 2003, 01:55 PM
I'll go with Tuberload on the not sure if its possible, well through batch scripting anyways. At the same time I think if it is possible, theres information out there to help you do it. It shouldn't be hard at all to get the folder its in, just get the location of the batch file youre running and then set it to a variable for the location to change, but then im not sure how to change it for viewing hidden/system files.

Edit: Whoever posts next (or you need to look into this yourself dyn.) start checking DOS commands to do something like that, thats basically your only way of accomplishing something like this, iirc.
Title: Out of curiousity...
Post by: Kp on November 28, 2003, 03:18 PM
Why hasn't anyone suggested making a little command line executable to do what he wants?  I'm almost certain it'll be some obscure registry change, which should be easy to make with a console app once you know what you're changing.
Title: Re:DOS Batch File Script Question
Post by: iago on November 28, 2003, 03:26 PM
I actually think this is stored in desktop.ini in each folder, but I could be wrong.
Title: Re:DOS Batch File Script Question
Post by: iago on November 28, 2003, 03:26 PM
Quote from: Tuberload on November 28, 2003, 04:20 AM
Since no one is answering your question I will throw in my two cents.

Note that it had only been up for 2.5 hours, in the middle of the night :P
Title: Re:DOS Batch File Script Question
Post by: Adron on November 28, 2003, 10:42 PM
You can modify the registry from a .bat file using regedit <file.reg> with some switch to make it silent.
Title: Re:DOS Batch File Script Question
Post by: Skywing on November 28, 2003, 11:46 PM
Quote from: Adron on November 28, 2003, 10:42 PM
You can modify the registry from a .bat file using regedit <file.reg> with some switch to make it silent.
Windows Server 2003 also includes a handy command-line registry editor, reg.exe:
QuoteC:\WINDOWS>reg /?

REG Operation [Parameter List]

 Operation  [ QUERY   | ADD    | DELETE  | COPY    |
              SAVE    | LOAD   | UNLOAD  | RESTORE |
              COMPARE | EXPORT | IMPORT ]

Return Code: (Except of REG COMPARE)

 0 - Successful
 1 - Failed

For help on a specific operation type:

 REG Operation /?

Examples:

 REG QUERY /?
 REG ADD /?
 REG DELETE /?
 REG COPY /?
 REG SAVE /?
 REG RESTORE /?
 REG LOAD /?
 REG UNLOAD /?
 REG COMPARE /?
 REG EXPORT /?
 REG IMPORT /?
Note that you give everything as command-line parameters here, and don't need to use .reg files.
Title: Re:DOS Batch File Script Question
Post by: Tuberload on November 29, 2003, 04:37 AM
Quote from: iago on November 28, 2003, 03:26 PM
Quote from: Tuberload on November 28, 2003, 04:20 AM
Since no one is answering your question I will throw in my two cents.

Note that it had only been up for 2.5 hours, in the middle of the night :P
Lol, for some reason I thought it had been up for a day or so, and no one was answering do to it's simple nature.   :-[