• Welcome to Valhalla Legends Archive.
 

DOS Batch File Script Question

Started by Dyndrilliac, November 27, 2003, 12:41 AM

Previous topic - Next topic

Dyndrilliac

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?
Quote from: Edsger W. DijkstraIt is practically impossible to teach good programming to students that have had a prior exposure to BASIC; as potential programmers they are mentally mutilated beyond hope of regeneration.

Tuberload

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.
Quote"Pray not for lighter burdens, but for stronger backs." -- Teddy Roosevelt
"Your forefathers have given you freedom, so good luck, see you around, hope you make it" -- Unknown

Hostile

#2
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.
- Hostile is sexy.

Kp

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.
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

iago

I actually think this is stored in desktop.ini in each folder, but I could be wrong.
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


iago

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
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Adron

You can modify the registry from a .bat file using regedit <file.reg> with some switch to make it silent.

Skywing

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.

Tuberload

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.   :-[
Quote"Pray not for lighter burdens, but for stronger backs." -- Teddy Roosevelt
"Your forefathers have given you freedom, so good luck, see you around, hope you make it" -- Unknown