Slyck.com
 
Slyck Chatbox - And More

List in dos New !screenshot! thanx 2 IneptVagrant

This is the forum to discuss tech-software related issues.
Forum rules
PLEASE READ BEFORE POSTING: Slyck Forum Rules

List in dos New !screenshot! thanx 2 IneptVagrant

Postby Captain America » Tue Aug 21, 2007 4:53 pm

My dos is a bit rusty and am trying to remember a few things.So I need a little bit of help.

I'm trying to make a .bat file that will automatically create a .txt list for folders I am using, and folders I am not using.

I already have the folders I am using (list) done.

Now all the remaining folders need to go on another list (too many for me to type manually).

I want to be able to paste the (I am using) list in one text file and have the .bat filter out the folders I am not using into a .txt list (keeping the directory intact).


************************************************************************************************************************************************
Thanks to IneptVagrant's program, I was able to add 5 more rows of characters to my mugen roster (thought I had way more left than that). I'll make a video once the entire thing is complete (should be soon).

Thanks again IneptVagrant! and all others who helped.


Image
Last edited by Captain America on Fri Aug 24, 2007 6:58 pm, edited 4 times in total.
My Machine:Intel I7 @ 2.7ghz| MSI X58 Platinum SLI Socket 1366 ATX Motherboard MS-7522| 2x Hitachi 500gig internal| Geforce gtx 260 core 216|SB X-Fi Xtreme Audio 7.1 2x| dvd lightscribe|Vista 64bit
User avatar
Captain America
 
Posts: 1687
Joined: Thu Sep 09, 2004 1:37 pm
Location: Be All You Can Be.

Re: Help creating simple have/have not list in dos

Postby IneptVagrant » Wed Aug 22, 2007 7:41 am

Can't think of a good way to do it in dos, find is useless since can't match whole strings only, and can't read a file line by line.

If your "using" list is small, may be eziest to generate a list of directories, and remove the "using" ones from it manually.

Or I could give you some c++ code (which can read from files and process arrays) and you could compile a exe, instead.
IneptVagrant
 
Posts: 1247
Joined: Tue Nov 15, 2005 5:07 am
Location: close the world . . . . . . . . . . . . . . txEn eht nepO

Re: Help creating simple have/have not list in dos

Postby Captain America » Wed Aug 22, 2007 10:27 am

That'd be great. Just don't spend any time you don't want to on it.
If you need anything for m.u.g.e.n let me know, I pretty much have it all.

My "I am using" list is pretty big. It's somewhere in the 550 character range.

Only other way I could finish this, is by starting a complete new select.def and go from top to bottom of all the folders.


Thanks a lot for the work!
My Machine:Intel I7 @ 2.7ghz| MSI X58 Platinum SLI Socket 1366 ATX Motherboard MS-7522| 2x Hitachi 500gig internal| Geforce gtx 260 core 216|SB X-Fi Xtreme Audio 7.1 2x| dvd lightscribe|Vista 64bit
User avatar
Captain America
 
Posts: 1687
Joined: Thu Sep 09, 2004 1:37 pm
Location: Be All You Can Be.

Re: Help creating simple have/have not list in dos

Postby IneptVagrant » Thu Aug 23, 2007 10:03 am

Figured out a way to do it!

Format your "using" list like... dir1;dir2;dir3; -- so each dir is followed by a semi-colon, all on one line. Ez enough to do a replace all to do that.

Then just call "create.bat myList.txt" or whatever you name the .bat and/or other file
It needs to be in the same directory as the folders you are interested in. myList.txt can be anywhere, but might as well put it with the .bat file

I create a temp file "stemp.bat" to hold a stack, so be sure no other file has that name! Took about 3 hrs from start to finish, so you owe me about 180$. :P

Code: Select all
@echo off

if not exist $1 goto :error

echo Creating stack process (stemp.bat)...
echo.> stemp.bat

echo @echo off>> stemp.bat
echo goto %%1>> stemp.bat

echo :push>> stemp.bat
echo set _stack=%%2;%%_stack%%>> stemp.bat
echo goto :EOF>> stemp.bat

echo :pop>> stemp.bat
echo for /f "usebackq tokens=2 delims=;=" %%%%a in (`set _stack`) do set _retval=%%%%a>> stemp.bat
echo for /f "usebackq tokens=2* delims=;=" %%%%a in (`set _stack`) do set _stack=%%%%b>> stemp.bat
echo goto :EOF>> stemp.bat

echo :peek>> stemp.bat
echo for /f "usebackq tokens=2 delims=;=" %%%%a in (`set _stack`) do set _retval=%%%%a>> stemp.bat
echo goto :EOF>> stemp.bat

echo :clear>> stemp.bat
echo set _stack=>> stemp.bat
echo goto :EOF>> stemp.bat

@echo Creating dir list...

call stemp.bat clear
for /D %%d in (*.*) do call stemp.bat push %%d

@echo Processing dir list...
echo.> olist.txt
:queue
call stemp.bat pop
find /i "%_retval%;" %1>nul
if errorlevel 1 echo %_retval%>> olist.txt
if not defined _stack goto :clean
goto queue

:clean
@echo Removing stack process (stemp.bat)...
del stemp.bat
@echo Enjoy!
goto :EOF

:error
@echo Could Not Find %1
IneptVagrant
 
Posts: 1247
Joined: Tue Nov 15, 2005 5:07 am
Location: close the world . . . . . . . . . . . . . . txEn eht nepO

Re: Help creating simple have/have not list in dos

Postby Captain America » Thu Aug 23, 2007 1:34 pm

Freakin sweet!

It's working right now, gonna take a while since there's a LOT of folders 8)

hmm. How about 180$ worth of mp3z? :mrgreen: :pirate: Seriously, let me know if u need any type of files.

Thanks a lot m8.

Let me know if you need anything mugen wise as well

I'll be posting a vid once I'm done with the final list.


btw, nice title for the code :headbang:

Many thanx!!
My Machine:Intel I7 @ 2.7ghz| MSI X58 Platinum SLI Socket 1366 ATX Motherboard MS-7522| 2x Hitachi 500gig internal| Geforce gtx 260 core 216|SB X-Fi Xtreme Audio 7.1 2x| dvd lightscribe|Vista 64bit
User avatar
Captain America
 
Posts: 1687
Joined: Thu Sep 09, 2004 1:37 pm
Location: Be All You Can Be.


Return to Tech/Software Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

© 2001-2008 Slyck.com