Author Topic: i need script advice  (Read 563 times)

daydreamer

  • Member
  • *****
  • Posts: 2395
  • my kind of REAL10 Blonde
i need script advice
« on: December 02, 2022, 09:52:25 AM »
I want add things to make.bat or separate .bat
Usual is commands to assemble .asm file
Seen delete commands if previous .obj and .exe exists
I dont know to make copy of .asm file and rename it to .txt file in .bat file ?
Is possible?

Is it possible do this also with
Sourcecode\ folder together with all subfolders ,each an asm project folder ,type something in console ?

my none asm creations
http://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

zedd151

  • Member
  • *****
  • Posts: 1957
Re: i need script advice
« Reply #1 on: December 02, 2022, 11:08:21 AM »
easy peasy, use the 'copy' command
Code: [Select]
copy filename.asm filename.txt

Can be added to the makeit.bat (or whatever batch file name) file, and will make the copy when assembling. I tested it on the 'minimum' example from Masm32 SDK before posting this. It copied 'minimum.asm to minimum.txt' without any problem.
Regards, zedd.
:tongue:

zedd151

  • Member
  • *****
  • Posts: 1957
Re: i need script advice
« Reply #2 on: December 02, 2022, 11:26:43 AM »
Quote
Is it possible do this also with
Sourcecode\ folder together with all subfolders ,each an asm project folder ,type something in console ?


Do you mean a recursive copy of all .asm files to .txt files, included in sub folders as well? Would probably be better to investigate using 'xcopy' as that is a bit more involved than the simple 'copy' example I gave above.

It's been a long time since I have used those commands.
Regards, zedd.
:tongue:

daydreamer

  • Member
  • *****
  • Posts: 2395
  • my kind of REAL10 Blonde
Re: i need script advice
« Reply #3 on: December 02, 2022, 11:52:36 PM »
Thanks zedd :thumbsup:
I added copy "x.asm x.txt"to makeit.bat after all ifs that check for assembly error and link error
Going to create revert.bat in same folder
Copy "x.txt x2.asm"
Now i can edit code in any text editor on any device i have
Found out my Samsung tablet also had simple text editor "db text editor"

my none asm creations
http://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

Vortex

  • Member
  • *****
  • Posts: 2788
Re: i need script advice
« Reply #4 on: December 03, 2022, 04:54:57 AM »
Hi daydreamer,

A very good tool for advanced scripting :

https://frippery.org/busybox/

Quote
BusyBox is a single binary that contains many common Unix tools. It's often found in embedded Linux systems like routers, in Android smartphones, in Linux containers and anywhere else it would be handy to have a compact set of Unix command line tools.

busybox-w32 is a port of BusyBox to the Microsoft Windows WIN32 API. It brings a subset of the functionality of BusyBox to Windows in a single self-contained native executable.