| Forum Home | ||||
| PC World Chat | ||||
| Thread ID: 102373 | 2009-08-17 07:59:00 | How does this script work? | the_bogan (9949) | PC World Chat |
| Post ID | Timestamp | Content | User | ||
| 801906 | 2009-08-17 07:59:00 | I picked this up a couple of years ago, where for a game mod, I put the mod in it's own file (files in the folder named the same) @echo off Path .. game I run this .vbs script, it just seemed to swap the files in the main folder for the ones in the mod file. I'm just curious as to how it does that. |
the_bogan (9949) | ||
| 801907 | 2009-08-17 08:18:00 | I picked this up a couple of years ago, where for a game mod, I put the mod in it's own file (files in the folder named the same) @echo off Path .. game I run this .vbs script, it just seemed to swap the files in the main folder for the ones in the mod file. I'm just curious as to how it does that. Looks like an DOS batch file to me especially when you have echo off as the first command. |
Sweep (90) | ||
| 801908 | 2009-08-17 08:21:00 | So also post the full script you are using. | Sweep (90) | ||
| 801909 | 2009-08-17 08:27:00 | So also post the full script you are using. That is the full script. Oops, and you're right. I do have it as a .bat file, not .vbs. |
the_bogan (9949) | ||
| 801910 | 2009-08-17 08:49:00 | That is the full script. Oops, and you're right. I do have it as a .bat file, not .vbs. So you have a batch file rather than a script in visual basic. Do you still want to know how the batch file works? |
Sweep (90) | ||
| 801911 | 2009-08-17 08:51:00 | Yep. | the_bogan (9949) | ||
| 801912 | 2009-08-17 08:59:00 | I picked this up a couple of years ago, where for a game mod, I put the mod in it's own file (files in the folder named the same) @echo off Path .. game I run this .vbs script, it just seemed to swap the files in the main folder for the ones in the mod file. I'm just curious as to how it does that. it is just setting the path to the directory above the current one, then running the game. |
robsonde (120) | ||
| 801913 | 2009-08-17 09:10:00 | Yep. If you have given the full commands for the batch file all it would do is:- Echo off makes it silent so you get no input from a keyboard. The whole batch file looks to me that you simply change a directory and run a game from within the same directory or folder. In the event you run a command from a command line prompt the operating system may not find the game.exe you are trying to run and that is why you may get a message that says "bad command or file name" If you have installed the game on drive D or whatever. I can explain further if you need me to. |
Sweep (90) | ||
| 801914 | 2009-08-17 09:18:00 | So you're saying that essentially, the batch file just takes whatever is in the directory, checks the directory above it and swaps the files that are in the directory and uses the rest of the files in the directory above it? | the_bogan (9949) | ||
| 801915 | 2009-08-17 10:01:00 | Nope - there is no swapping involved, it just runs the file from its current location. | Erayd (23) | ||
| 1 2 | |||||