Go Back   Computer Forums > General Computing > Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 08-30-2004, 07:51 PM   #1
Baseband Member
 
sean82007's Avatar
 
Join Date: May 2004
Posts: 87
Default Batch file directories

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.
__________________

sean82007 is offline   Reply With Quote
Old 08-31-2004, 06:03 AM   #2
Site Team
 
root's Avatar
 
Join Date: Mar 2004
Posts: 8,006
Default Re: Batch file directories

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
__________________

root is offline   Reply With Quote
Old 08-31-2004, 11:59 AM   #3
Baseband Member
 
sean82007's Avatar
 
Join Date: May 2004
Posts: 87
Default Re: Batch file directories

thanx
sean82007 is offline   Reply With Quote
Old 08-31-2004, 12:01 PM   #4
Baseband Member
 
sean82007's Avatar
 
Join Date: May 2004
Posts: 87
Default Re: Batch file directories

damn it didn't work, it said The system cannot find the path specified. Think it could be because of the restrictions?
sean82007 is offline   Reply With Quote
Old 08-31-2004, 12:24 PM   #5
Site Team
 
root's Avatar
 
Join Date: Mar 2004
Posts: 8,006
Default Re: Batch file directories

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
root is offline   Reply With Quote
Old 09-20-2004, 12:06 PM   #6
Baseband Member
 
sean82007's Avatar
 
Join Date: May 2004
Posts: 87
Default Re: Batch file directories

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.
__________________

sean82007 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 08:07 PM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0