Argonath RPG - A World of its own

Argonath RPG Community => Hardware/Software support => Resolved issues => Topic started by: Link9rly on July 15, 2009, 10:50:25 pm

Title: I need a .bat script
Post by: Link9rly on July 15, 2009, 10:50:25 pm
 I need .bat script help. I want to make a folder opening bat. for example, you click on it and it opens the folder I told it to. I want to do this since I have custom shortcuts on my keyboard. I want it to open a game folder. C:\Users\Censored\Desktop\Games . Anyone?  :help:
Title: Re: I need a .bat script
Post by: MikeUK on July 15, 2009, 11:05:58 pm
Name the use directory and I will make you one
Title: Re: I need a .bat script
Post by: 9r2e5i3k on July 15, 2009, 11:47:42 pm
explorer "%folder name%"

quote signs required if the path contains spaces.


So if your keyboard opens applications, just bind explorer "C:\Users\Censored\Desktop\Games" to it.
Title: Re: I need a .bat script
Post by: Link9rly on July 15, 2009, 11:51:44 pm
Got it Thanks Grze  :D
Title: Re: I need a .bat script
Post by: cDa on July 15, 2009, 11:54:38 pm
open notepad

Explorer C:\Users\Censored\Desktop\Games

save as name.bat
Title: Re: I need a .bat script
Post by: 9r2e5i3k on July 16, 2009, 12:04:02 am
open notepad

Explorer C:\Users\Censored\Desktop\Games

save as name.bat

Well, to be honest a .bat file is not really needed if it's meant to contain one command line. :D
Title: Re: I need a .bat script
Post by: cDa on July 16, 2009, 12:18:33 am
true true..
Title: Re: I need a .bat script
Post by: Kitsune on July 16, 2009, 05:03:26 am
You've already got the answer, but this is something advanced from that, which I'm just throwing out there.

I made a batch file which I put on my RocketDock (http://www.rocketdock.com), that basicly opens folders or files that I want given what I type at the start, which I found very useful and really efficient.

(http://img505.imageshack.us/img505/6773/quickpanel.jpg)

@echo off
title Quick Panel
:start
set /p jumpselection=^>
if %jumpselection%==??? (
   explorer.exe C:\Users\Kitsune\Downloads\???
   exit
)
if %jumpselection%==??? (
   explorer.exe C:\Users\Kitsune\Downloads\???
   exit
)
if %jumpselection%==music (
   explorer.exe C:\Users\Kitsune\Music
   exit
)
if %jumpselection%==dls (
   explorer.exe C:\Users\Kitsune\Downloads
   exit
)
if %jumpselection%==msn (
   explorer.exe C:\Users\Kitsune\Documents\My Received Files
   exit
)
if %jumpselection%==edit (
   notepad.exe C:\Users\Kitsune\Documents\Task Bar Icons\quick.bat
   exit
)
if %jumpselection%==exit (
   exit
)
if %jumpselection%==icons (
   C:\Program Files\RocketDock\Icons
   exit
)
if %jumpselection%==pics (
   explorer.exe C:\Users\Kitsune\Pictures
   exit
)
if %jumpselection%==messenger (
   cd C:\Program Files\Windows Live\Messenger\
   msnmsgr.exe
   exit
)
if %jumpselection%==system32 (
   explorer.exe C:\Windows\System32
   exit
)
if %jumpselection%==themes (
   explorer.exe C:\Windows\Resources\Themes
   exit
)
echo Invalid command.
goto start


I added a command edit, which makes it really simply to add or remove options. Just type the command, edit the code, save, then run Quick Panel again.

EDIT: Anyone know a more efficient way to do this? I'm not sure how to use case statements in batch (or other similar statements for that matter).
Title: Re: I need a .bat script
Post by: rJCaiG on July 16, 2009, 05:36:38 am
So if you double click that batch file, you can open any folder by typing it in..?
Not completely sure of what it does. Explain it to me? :D

Post Merge: July 15, 2009, 10:37:53 am
wait no i get it now..hmm, interesting

Post Merge: July 16, 2009, 05:38:50 am
I noticed you changed your name around with Kitsune.
Tricky :D
Title: Re: I need a .bat script
Post by: 9r2e5i3k on July 16, 2009, 01:04:24 pm
EDIT: Anyone know a more efficient way to do this? I'm not sure how to use case statements in batch (or other similar statements for that matter).
Yes, by making a program C/C++.

I might just try to make one like that, even though I'm on a break from school  :roll:
Title: Re: I need a .bat script
Post by: rJCaiG on July 16, 2009, 01:06:26 pm
Can you run C/C++ scripts from desktop?
Title: Re: I need a .bat script
Post by: 9r2e5i3k on July 16, 2009, 01:09:37 pm
Can you run C/C++ scripts from desktop?

by making a program C/C++.

That means compiling. Though it wouldn't take up much space  :razz:
Title: Re: I need a .bat script
Post by: Kitsune on July 16, 2009, 03:37:31 pm
Yes, by making a program C/C++.

I might just try to make one like that, even though I'm on a break from school  :roll:
Well obviously, I was refering to a batch method. :P
SimplePortal 2.3.7 © 2008-2025, SimplePortal