Jump to content


- - - - -

auto Yes in batch file?


  • Please log in to reply
17 replies to this topic

#1 Guest_K1u_*

Guest_K1u_*
  • Guests

Posted 03 October 2006 - 06:04 PM

Ok if i made a batch file for example-

CODE
cd C:WINDOWSsystem32

del crapshack


If crapshack is a folder when u run the batch file file u will get a Y/N message if u want to delete how can i make it automatically say yes in batch file?

#2 Sparda

Sparda

    Hak5 Junkie

  • Active Members
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 7,849 posts
  • Gender:Male

Posted 03 October 2006 - 06:48 PM

del /Q

#3 Guest_K1u_*

Guest_K1u_*
  • Guests

Posted 03 October 2006 - 06:52 PM

Thanks

#4 Sparda

Sparda

    Hak5 Junkie

  • Active Members
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 7,849 posts
  • Gender:Male

Posted 03 October 2006 - 06:53 PM



You wil be sorry for making me write some unessasery code lol ;)

#5 Guest_K1u_*

Guest_K1u_*
  • Guests

Posted 03 October 2006 - 07:07 PM

QUOTE
You wil be sorry for making me write some unessasery code lol :wink:


lol well ur help is appreciated

#6 Guest_K1u_*

Guest_K1u_*
  • Guests

Posted 03 October 2006 - 07:10 PM

Hey do u know of any tutorials that help u learn how to do advanced batch files?

#7 ChevronX

ChevronX

    Hak5 Pirate

  • Active Members
  • PipPipPipPipPipPip
  • 273 posts
  • Location:New Zealand

Posted 03 October 2006 - 07:11 PM

http://www.onesmartc...atch-files.html

#8 PoyBoy

PoyBoy

    Hak5 Uber fan +++

  • Active Members
  • PipPipPipPipPipPipPipPipPip
  • 1,182 posts
  • Gender:Not Telling
  • Location:Between Keyboard and Chair

Posted 03 October 2006 - 07:27 PM

Ya, thats a really good one
Damn you, damn the broccoli, and damn the Wright Brothers!


#9 Guest_K1u_*

Guest_K1u_*
  • Guests

Posted 03 October 2006 - 07:44 PM

QUOTE


WHOA!!! Freaking nice man sweetness thanks sooo much :D

#10 Guest_K1u_*

Guest_K1u_*
  • Guests

Posted 03 October 2006 - 07:49 PM

I resized my avatar is this ok or should i size it down some more?

#11 PoyBoy

PoyBoy

    Hak5 Uber fan +++

  • Active Members
  • PipPipPipPipPipPipPipPipPip
  • 1,182 posts
  • Gender:Not Telling
  • Location:Between Keyboard and Chair

Posted 03 October 2006 - 08:10 PM

Nothing is showing up but white, but it could reasonably be double the size?
(Authority post here with a real reply)
Damn you, damn the broccoli, and damn the Wright Brothers!


#12 VaKo

VaKo

    Hak5 Junkie

  • Active Members
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 7,731 posts
  • Gender:Male
  • Location:Hants, UK

Posted 03 October 2006 - 09:44 PM

QUOTE ("K1u")
I resized my avatar is this ok or should i size it down some more?

My avatar is pushing it. Its basically a max width of 160px and up to 200px height wise.
"My name is Ozymandias, king of kings,
Look on my works, ye Mighty, and despair!"

#13 hammet

hammet

    Hackling

  • Members
  • Pip
  • 11 posts

Posted 09 November 2006 - 07:09 AM

QUOTE ("Sparda")
del /Q


No its del /y

#14 pseudobreed

pseudobreed

    Hak5 Zombie

  • Members
  • PipPipPipPipPip
  • 171 posts

Posted 09 November 2006 - 08:01 AM

QUOTE
Deletes one or more files.

DEL [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names
ERASE [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names

names Specifies a list of one or more files or directories.
Wildcards may be used to delete multiple files. If a
directory is specified, all files within the directory
will be deleted.

/P Prompts for confirmation before deleting each file.
/F Force deleting of read-only files.
/S Delete specified files from all subdirectories.
/Q Quiet mode, do not ask if ok to delete on global wildcard
/A Selects files to delete based on attributes
attributes R Read-only files S System files
H Hidden files A Files ready for archiving
- Prefix meaning not

If Command Extensions are enabled DEL and ERASE change as follows:

The display semantics of the /S switch are reversed in that it shows
you only the files that are deleted, not the ones it could not find.


#15 hammet

hammet

    Hackling

  • Members
  • Pip
  • 11 posts

Posted 09 November 2006 - 10:31 AM

QUOTE ("pseudobreed")
QUOTE
...


I guess you are right...

The /y is when you Copy....
and /-y is to overwrite !!!
Sorry...

#16 Mick

Mick

    Hak5 Fan +

  • Members
  • PipPipPip
  • 40 posts

Posted 09 November 2006 - 07:11 PM

Well, if you want to get advanced, you could always do
CODE
echo y|del something


or even store your prerecorded answers in a file and call
CODE
del something < answers.txt


#17 Shiva

Shiva

    Hak5 Fan

  • Members
  • PipPip
  • 27 posts

Posted 10 November 2006 - 12:41 AM

U could do a del /? to get all the parameters it can take.

/? works with most dos commands.

#18 Spartain X

Spartain X

    Hak5 Zombie

  • Members
  • PipPipPipPipPip
  • 166 posts
  • Location:Some where on the TOR Network

Posted 11 November 2006 - 03:06 AM

i also highly recommend checking out http://www.ss64.com/nt/index.html
there is a lot of detailed information about window's command line applications and their syntax and sample scripts
and for quick help with any command it's always good to run the command with /? or -h or /help or --help as they usually list the syntax and usage it's that does not work google it




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users