Batch file directories

sean82007

Baseband Member
Messages
87
Hi, Is it possible say that I want to access the C:/WINDOWS/Startup is it possible to do that through a batch file.

I tried this can you tell me whats wrong with my coding.

@ECHO OFF
IF EXIST C: GOTO C:
PAUSE

Whats up with it. Or is there some other command that I may need to use.
 
the problem is goto is a line jump command...
Code:
@echo off
if exist C: goto :drive
goto :end
:drive
c:
cd \
cd windows
cd startup
pause
:end
or
Code:
@echo off
if exist c: c:
pause
 
damn it didn't work, it said The system cannot find the path specified. Think it could be because of the restrictions?
 
I just noticed when you first wrote out the path you wrote c:/windows/startup.

the slashes go the other way in windows c:\windows\startup...

Unless you are using the code I posted for you, post the actual code you are using...
I'm not sure what you mean by restrictions? are you on a school network or something?

Check to make sure the actual path exists at the command line just write
Code:
if exist c:\windows\startup echo yes
 
Yes im on a school network, they use bess for there internet blocking software. But what I am trying to figure out is what the batch file that runs when u log on do.
 
Back
Top Bottom