Batch File Help (Spaces in Path)

The following line will not work

C:\Documents and Settings\shadow\a.jpg

The following line is correct, just put double quote when you see space in the path

C:\"Documents and Settings"\shadow\a.jpg
Advertisements

4 thoughts on “Batch File Help (Spaces in Path)

  1. The following code works: but I was wondering what I could do so that it wouldn’t give me an update at 10 mins if I write 20; I use windows 7 and I only barely understand programing.

    @ echo off
    set /p option=S Shutdown – R Restart – L Logoff (then press enter)

    if /i %option%==S goto :T
    if /i %option%==R goto :T
    if /i %option%==L goto :C

    if /i not %option%==L goto 😀

    :A
    shutdown -s -t %var2% & pause
    goto :E
    :B
    shutdown -r -t %var2% & pause
    goto :E
    :C
    shutdown -l & goto :eof
    😀
    echo %option% & pause
    GOTO :eof
    :E
    set /p abort=A for abort (then press enter)
    if /i %abort%==A shutdown -a
    Goto :eof
    :T

    set /p customize= Would you like to customize time? y for yes
    if /i %customize%==y Goto :O
    set /a var2=05
    if /i %option%==S goto :A
    if /i %option%==R goto :B

    :O
    set /p var=how many minutes till shutdown?
    set /a var2=%var%*60

    if /i %option%==S goto :A
    if /i %option%==R goto :B

  2. whoah this weblog is wonderful i really like studying your posts. Keep up the great paintings! You already know, lots of individuals are searching around for this information, you can help them greatly. kddbdaaddack

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s