d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Need Help On Creating Batch File
Add Reply New Topic New Poll
Member
Posts: 6,175
Joined: Sep 4 2009
Gold: Locked
Trader: Scammer
Feb 3 2015 07:33pm
I'm suppose to create a DOS batch file named HIDE.BAT that will use for a FOR command and ATTRIB command to make all the .TXT files in the directory hidden.

I couldn't make it to class last week so I'm pretty lost at this question :l

Anyone here know how to do this and willing to share their knowledge with me, that'll be greatly appreciated. Thanks
Member
Posts: 1,995
Joined: Jun 28 2006
Gold: 7.41
Feb 3 2015 08:03pm
Seems a bit weird to require both a for and attrib, seeing as how you can do it with just attrib.

for %%f in (*.txt) do attrib +H "%%f"

or just

attrib /S +H *.txt
Member
Posts: 6,175
Joined: Sep 4 2009
Gold: Locked
Trader: Scammer
Feb 3 2015 08:35pm
Quote (Minkomonster @ Feb 3 2015 06:03pm)
Seems a bit weird to require both a for and attrib, seeing as how you can do it with just attrib.

for %%f in (*.txt) do attrib +H "%%f"

or just

attrib /S +H *.txt


got it now ! thanks for the help :D
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll