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

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 😀

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

    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

    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: Logo

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

Google photo

You are commenting using your Google 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 )

Connecting to %s