Search found 45 matches

by Yanta
17 Sep 2020 20:18
Forum: DOS Batch Forum
Topic: How to handle file names with &
Replies: 2
Views: 148

Re: How to handle file names with &

Thanks
by Yanta
17 Sep 2020 19:56
Forum: DOS Batch Forum
Topic: command retunrs no value even though entry exists
Replies: 14
Views: 485

Re: command returns no value even though entry exists

Here is what it looks like. There are over 120 games so I won't post the entire games section.. When I said I "Created the file fron scratch" not one line of this code was changed. I recreated the folders.txt file from scratch. The only changes I've made recently are to add .exe to the end of those ...
by Yanta
17 Sep 2020 04:29
Forum: DOS Batch Forum
Topic: Debugging / syntax checksing tools for batch
Replies: 25
Views: 3159

Re: Debugging / syntax checking tools for batch

Indeed. Both of those were pointed out some time ago. And I removed them all a long time ago. It's possible I missed something, but they don't cause the debugger to fail or warn so it's easy to miss them in a long script. I shall check again. EDIT: Nope. All labels that were within ( ) blocks had al...
by Yanta
17 Sep 2020 04:05
Forum: DOS Batch Forum
Topic: command retunrs no value even though entry exists
Replies: 14
Views: 485

Re: command retunrs no value even though entry exists

No, no, I didn't re-write any code at all. When I said I "So I deleted the entire file and recreated it from scratch" I meant I recreated the folders.txt file. There is no old code vs new code. The same code worked after recreating the folders.txt file, imho, reinforcing the earlier statement @ojbak...
by Yanta
16 Sep 2020 21:12
Forum: DOS Batch Forum
Topic: How to handle file names with &
Replies: 2
Views: 148

How to handle file names with &

I have a font I want to install called Spirit & Ghost.ttf The following code processes a list of font files in a folder. SET SRC=%CD:~0,2% set SrcPath=%SRC%\PostInstall\%USERNAME% :FONTS IF EXIST "%SrcPath%\Fonts\" ( Echo Installing Custom Fonts Echo %time% Installing Custom Fonts >>C:\%USERDOMAIN%....
by Yanta
14 Sep 2020 05:23
Forum: DOS Batch Forum
Topic: Debugging / syntax checksing tools for batch
Replies: 25
Views: 3159

Re: Debugging / syntax checking tools for batch

Just thought I'd update on this. My script is now 8,000 lines and still growing. I've found a free easy to use IDE that includes a debugger from https://sourceforge.net/projects/batch-compiler/ Does lots more than just syntax check and debug scripts, but they are the only features I need atm. Since ...
by Yanta
14 Sep 2020 04:32
Forum: DOS Batch Forum
Topic: command retunrs no value even though entry exists
Replies: 14
Views: 485

Re: command retunrs no value even though entry exists

I still am..

Code: Select all

IF /I "%DoGame:~0,1%"=="Y" (
Game 1
Game 2
Runescape
Game 3
Game 4
etc
)
I compared the folders.old.txt with the new one I created and there was 1 byte difference in the file size, but they looked identical. (3610 vs 3609 bytes)
by Yanta
13 Sep 2020 04:17
Forum: DOS Batch Forum
Topic: command retunrs no value even though entry exists
Replies: 14
Views: 485

Re: command retunrs no value even though entry exists

Is seems there is something in you Folders.txt that is not visible in the lines you have posted. You need to examine what is going on inside the for-loop to see why it fails on Runescape. Add the following code to yout batchfile, run it and check the new file FolderDEBUG.txt "%SrcPath%\foldersDEBUG...
by Yanta
11 Sep 2020 00:13
Forum: DOS Batch Forum
Topic: command retunrs no value even though entry exists
Replies: 14
Views: 485

Re: command retunrs no value even though entry exists

Yes. I suspect if SrcPath was not defined the other 30 or so games would also have failed. SrcPath is J:\PostInstall\Corey, see below... SET SRC=%CD:~0,2% set SrcPath=%SRC%\PostInstall\%USERNAME% set RegPath=%SRC%\PostInstall\%USERNAME%\Applications I've run it dozens of times and it is null every s...
by Yanta
09 Sep 2020 20:05
Forum: DOS Batch Forum
Topic: command retunrs no value even though entry exists
Replies: 14
Views: 485

command retunrs no value even though entry exists

Recently I received some excellent support in reading a list of items from a text file and assigning the result to a variable. However, it seems to be struggling with a single entry. This is an abridged list of the games... Overwolf,D:\Program Files (x86)\Overwolf Quake,I:\Program Files (x86)\Quake ...
by Yanta
20 Aug 2020 19:22
Forum: DOS Batch Forum
Topic: Stop search when exact match found.
Replies: 2
Views: 444

Re: Stop search when exact match found.

Legendary stuff.
For some reason I struggle to get my head around the FOR command and assigning variables to stuff. I don't know why. I don't usually have learning disabilities :)
thanks
by Yanta
20 Aug 2020 08:50
Forum: DOS Batch Forum
Topic: Stop search when exact match found.
Replies: 2
Views: 444

Stop search when exact match found.

I have a text file with the following... Cities Skylines,I:\Games\Cities Skylines Mass Transit Mass Effect,I:\Program Files (x86)\Mass Effect Mass Effect Andromeda,I:\Program Files (x86)\Mass Effect Andromeda Mass Effect 3,I:\Program Files (x86)\EA\Mass Effect 3 I search the file with.... for /F "To...
by Yanta
28 Jul 2020 21:34
Forum: DOS Batch Forum
Topic: Figuring out which computer is being used at two different locations
Replies: 12
Views: 1536

Re: Figuring out which computer is being used at two different locations

Thanks everyone. Lots of great ideas! @siberia-man: Yes, this manual process works. I was trying to automate the process, but have not yet found a way. The PC Name when Windows is installed is random. The script I'm writing actually changes the name into something more meaningful, but it can't be us...
by Yanta
28 Jul 2020 06:38
Forum: DOS Batch Forum
Topic: Understanding substitution in variables - solved
Replies: 0
Views: 702

Understanding substitution in variables - solved

I'm trying to install a bunch of fonts. srcpath=H:\PostInstall. There are 26 ttf files in the folder. I have some fonts that are already installed and some that aren't. I've just set it up with echo atm so I can see what's happening. original code for %%a in ("%SrcPath%\Fonts\*.?tf") do call :instal...
by Yanta
12 Jul 2020 01:30
Forum: DOS Batch Forum
Topic: Figuring out which computer is being used at two different locations
Replies: 12
Views: 1536

Re: Figuring out which computer is being used at two different locations

I've read that a few times, but I'm not following it. Perhaps I'm just tired. I've been working with this script for days now. I'll have to read it a few more times and get back to you. At present I've just set an environment variable on each PC Called SYSTEMLOCATION. It's working perfectly, but as ...