free

News

collapse

User Info

 
 
Welcome, Guest. Please login or register.
Did you miss your activation email?

* Recent Posts

NOTICE OF PARKING ENFORCEMENT CHANGES by Huntsman
[June 19, 2025, 05:22:50 pm]


Re: Stopping by by Sinister
[June 08, 2025, 01:58:04 pm]


Re: Stopping by by Ehks
[June 04, 2025, 12:25:17 am]


Re: Rest in peace by Stefanrsb
[June 02, 2025, 03:38:02 am]


Re: [SA:MP]House of Sforza | The Elite Power | Estd. 2006 | LS - LV by Stefanrsb
[June 02, 2025, 03:09:22 am]


Re: The Soprano Family | Royal Loyalty by Stefanrsb
[June 02, 2025, 03:00:31 am]


Re: The Gvardia Family || San Fierro's Main Power || Best criminal group of 09/10/11 by Stefanrsb
[June 02, 2025, 02:47:01 am]


Re: BALLAS | In memory of INFERNO 9 and NBA by Stefanrsb
[June 02, 2025, 02:31:29 am]


Re: Count to 1,000,000. by Stefanrsb
[June 02, 2025, 02:15:04 am]


Re: Stopping by by Traser
[June 01, 2025, 10:23:13 pm]


Re: Stopping by by Old Catzu
[May 18, 2025, 07:27:06 pm]


Re: Stopping by by TheRock
[May 18, 2025, 06:44:49 am]

* Who's Online

  • Dot Guests: 557
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Birthday Calender

July 2025
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5
6 7 8 9 10 11 12
13 14 [15] 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31

Batch (.bat) file expertise needed.

Ragdoll · 2076

0 Members and 1 Guest are viewing this topic.

Offline RagdollTopic starter

  • Can't touch this, nanananana nana na nanana
  • Veteran
  • ***
    • Posts: 2398
  • Meow.
  • With us since: 30/04/2010
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
on: August 02, 2014, 12:53:41 pm
Hello there.

I have a simple question that I have no idea where else to ask. I'm making a series of batch files that run a certain program on a certain file. The idea is, it's multiple copies of the same batch file in different folders. Each of those folders has ONE file in them that has a certain extension, and multiple other files.

I want to be able to just copy and paste the batch file into those folders and thus I want to find a way to replace the script inside the batch file to load the file that has that extension (since there's only one) without having to edit the script every time I add it to a folder to accommodate.

If my way of explaining is terrible, please do tell.
Regards.



Offline Teddy

  • Orc
  • *****
    • Posts: 9161
  • "I'm on top of the world because of you."
  • With us since: 05/02/2011
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
  • SA:MP: EvilMiku
Reply #1 on: August 02, 2014, 01:00:25 pm
What. The. Fu... uh

Okay, so you want a batch script that update's batch scripts which are exactly the same in different folders, more importantly you want this to be in the same batch file?

Perhaps it would be easier if you explained what it is you are exactly doing. Programmers think better when presented a problem, then we can possibly present another solution than using ghetto batch.



Offline RagdollTopic starter

  • Can't touch this, nanananana nana na nanana
  • Veteran
  • ***
    • Posts: 2398
  • Meow.
  • With us since: 30/04/2010
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Reply #2 on: August 02, 2014, 07:44:16 pm
I read what I wrote again and I dearly apologize to everyone who read it. I could use a speech and communications course up in University when I go there.

Either way, figured a better way to explain:
I have a compiler for a 3D model for the Source Engine. And I have a shitlode of models I need to compile. Every model needs some files with it and there's a text file (with the extension ".qc") that controls how it compiles. Those text files always have the same extension but different file names and there's always just ONE in every model folder. I need to tell the batch file to use the compiler on the ".qc" file in any directory it's in. ("it" referencing the batch file)

What I've been doing so far:
1-Renaming every ".qc" file to the same name so I don't change the batch file.
2-Editing every copy of the batch file to accommodate the ".qc" file's name.



Offline Marcel

  • Hero
  • ****
    • Posts: 0
  • With us since: 06/08/2007
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
  • SA:MP: Marcel
  • Discord: Marcel#4759
Reply #3 on: August 02, 2014, 08:14:23 pm
Hang on, will code you some stuff tonight that will solve your issue. I assume you are running windows 7 or 8 and that you can install visual studio if needed.




Offline RagdollTopic starter

  • Can't touch this, nanananana nana na nanana
  • Veteran
  • ***
    • Posts: 2398
  • Meow.
  • With us since: 30/04/2010
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Reply #4 on: August 02, 2014, 10:47:03 pm
Hang on, will code you some stuff tonight that will solve your issue. I assume you are running windows 7 or 8 and that you can install visual studio if needed.
It'd be fantastic if you do. And yes, Windows 7 x64. While we're on the subject, it was recommended to me to learn VB before moving on to C; so where can one learn VB in a way where I don't get lost?



Offline Londonian Bus Driver

  • Char{lie_Calston)
  • User
  • *
    • Posts: 82
  • Wagwan, fam?
  • With us since: 08/07/2014
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
  • IV:MP: Cal
Reply #5 on: August 03, 2014, 01:38:24 am
Just gonna' throw my two Ps in, if you need any help with QCs or a good ton of other Source Engine functions, give me notice.


One Love, One Life, One Street, One Day, One Way, One Pay... One Hustle.


Offline Teddy

  • Orc
  • *****
    • Posts: 9161
  • "I'm on top of the world because of you."
  • With us since: 05/02/2011
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
  • SA:MP: EvilMiku
Reply #6 on: August 03, 2014, 05:42:50 am
It'd be fantastic if you do. And yes, Windows 7 x64. While we're on the subject, it was recommended to me to learn VB before moving on to C; so where can one learn VB in a way where I don't get lost?

http://msdn.microsoft.com/en-us/vstudio/hh388573.aspx

If you don't already know basics of programming, consider reading this first:
http://en.wikiversity.org/wiki/Introduction_to_Programming
http://en.wikiversity.org/wiki/Programming_Logic

They don't teach you really any language, but just get the tip of your feet wet in the concepts of how languages work.



Offline RagdollTopic starter

  • Can't touch this, nanananana nana na nanana
  • Veteran
  • ***
    • Posts: 2398
  • Meow.
  • With us since: 30/04/2010
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Reply #7 on: August 03, 2014, 11:08:36 am
Just gonna' throw my two Ps in, if you need any help with QCs or a good ton of other Source Engine functions, give me notice.
I've got the QC part down but if you're good at texturing a terribly UV-mapped weapon with the same style as TF2, hit me up.

http://msdn.microsoft.com/en-us/vstudio/hh388573.aspx

If you don't already know basics of programming, consider reading this first:
http://en.wikiversity.org/wiki/Introduction_to_Programming
http://en.wikiversity.org/wiki/Programming_Logic

They don't teach you really any language, but just get the tip of your feet wet in the concepts of how languages work.
Perfect. Thanks a lot. :)



Offline LoHi

  • Regular
  • **
    • Posts: 501
    With us since: 14/09/2007
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Reply #8 on: August 03, 2014, 02:10:15 pm
Python is also super easy for stuff like this, I've done multiple projects with it.

No mercy for the weak, no pity for the dying, no tears for the slain.


Offline Londonian Bus Driver

  • Char{lie_Calston)
  • User
  • *
    • Posts: 82
  • Wagwan, fam?
  • With us since: 08/07/2014
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
  • IV:MP: Cal
Reply #9 on: August 03, 2014, 02:11:32 pm
I've got the QC part down but if you're good at texturing a terribly UV-mapped weapon with the same style as TF2, hit me up.
Perfect. Thanks a lot. :)

Sorry bruv, not my place. Best of luck.


One Love, One Life, One Street, One Day, One Way, One Pay... One Hustle.


Offline RagdollTopic starter

  • Can't touch this, nanananana nana na nanana
  • Veteran
  • ***
    • Posts: 2398
  • Meow.
  • With us since: 30/04/2010
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Reply #10 on: August 03, 2014, 07:33:46 pm
Python is also super easy for stuff like this, I've done multiple projects with it.
I got myself well into Python about two years ago but it's slipped my mind entirely since then so re-learning it for something rather simple would be a pain. :|

Sorry bruv, not my place. Best of luck.
Much appreciated.



 


SimplePortal 2.3.7 © 2008-2025, SimplePortal