Search found 553 matches
- 06 Mar 2024 10:18
- Forum: DOS Batch Forum
- Topic: How to debug this bat file
- Replies: 6
- Views: 1055
Re: How to debug this bat file
So, did you try it? Does it work? Start here: https://ss64.com/nt/syntax-esc.html Escape Character ^ Escape character. Adding the escape character before a command symbol allows it to be treated as ordinary text. These characters which normally have a special meaning can be escaped and then treated ...
- 05 Mar 2024 12:08
- Forum: DOS Batch Forum
- Topic: Macro for Dummies
- Replies: 16
- Views: 8435
Re: Macro for Dummies
Thank you all for all the info! I really appreciate it. I will go thru these posts in the following hours/days and post back.
Saso
(as mentioned I've been offline for some time)
Saso
(as mentioned I've been offline for some time)
- 05 Mar 2024 10:48
- Forum: DOS Batch Forum
- Topic: How to debug this bat file
- Replies: 6
- Views: 1055
Re: How to debug this bat file
Been offline for a while.
Maybe you should remove this line
or add ^ infront of the problematic characters (, ), |.
Maybe there are more.
Try this and let us know.
Saso
Maybe you should remove this line
Code: Select all
Rem (if command errors) || (exec this command)
Maybe there are more.
Try this and let us know.
Saso
- 10 Feb 2024 14:13
- Forum: DOS Batch Forum
- Topic: Macro for Dummies
- Replies: 16
- Views: 8435
Re: Macro for Dummies
Thanks a lot T3rry. But I think you should go back some more steps and start with the basics. I tried to understand this batch/macro you posted - too complicated. No luck. We would need something like 'hello world' and then go from there. Something like this: @echo off set helloworld=echo Hello Worl...
- 19 Jan 2024 06:25
- Forum: DOS Batch Forum
- Topic: How to copy a txt file into multiple txt files in a destination folder
- Replies: 3
- Views: 3117
Re: How to copy a txt file into multiple txt files in a destination folder
Code: Select all
copy file.txt folder\file1.txt
copy file.txt folder\file2.txt
copy file.txt folder\file3.txt
copy file.txt folder\file4.txt
Saso
- 11 Jan 2024 10:18
- Forum: DOS Batch Forum
- Topic: Faster batch macros
- Replies: 17
- Views: 9355
Re: Faster batch macros
I didn't understand a thing Jeb wrote.
I tried to learn how to make/use macros. No luck. A 'macro for dummies' should be posted by someone who can do it.
Saso
I tried to learn how to make/use macros. No luck. A 'macro for dummies' should be posted by someone who can do it.
Saso
- 06 Jan 2024 13:26
- Forum: DOS Batch Forum
- Topic: to dir or not to dir
- Replies: 1
- Views: 3311
Re: to dir or not to dir
2B OR NOT 2B=FF
Saso
Saso
- 21 Dec 2023 11:17
- Forum: DOS Batch Forum
- Topic: Why for loop wmic get processid return an extra invalid value?
- Replies: 3
- Views: 3885
Re: Why for loop wmic get processid return an extra invalid value?
Looks like wmic returns an extra empty line and this is what you get.
Saso
Saso
- 30 Nov 2023 01:26
- Forum: DOS Batch Forum
- Topic: dism.exe isn't running.
- Replies: 6
- Views: 22164
Re: dism.exe isn't running.
Code: Select all
If "%Drive%"==C:
Code: Select all
If "%Drive%"=="C:"
Same goes for other IF statements.
Saso
- 15 Nov 2023 06:23
- Forum: DOS Batch Forum
- Topic: [Solved] Move file to incremental subfolder based on file name prefix
- Replies: 3
- Views: 14945
Re: Move file to incremental subfolder based on file name prefix
Aacini's solutions are always so clever and short. I'm speechless.
Saso
Saso
- 11 Nov 2023 09:36
- Forum: DOS Batch Forum
- Topic: space is added to the file if it is after the extension
- Replies: 2
- Views: 14647
Re: space is added to the file if it is after the extension
Thanks Jeb!
Saso
Saso
- 11 Nov 2023 09:35
- Forum: DOS Batch Forum
- Topic: ECHOing to a file without a trailing space
- Replies: 6
- Views: 20347
Re: ECHOing to a file without a trailing space
@jeb: your solution does not work. I have ( and ) in my data so I get
@batcher: your solution:
works.
Thanks.
Saso
Code: Select all
34567891) was unexpected at this time.
Code: Select all
echo>file5.txt %field1%;%field2%;%field3%
Thanks.
Saso
- 10 Nov 2023 11:27
- Forum: DOS Batch Forum
- Topic: ECHOing to a file without a trailing space
- Replies: 6
- Views: 20347
ECHOing to a file without a trailing space
Hello all! @echo off set field1=a set field2=(a set field3=2 set field4=34564119 echo %field1%;%field2%;%field3%>file1.tmp echo %field1%;%field2%;%field3%>file2.tmp echo %field1%;%field2%;%field3% >file3.tmp echo (%field1%;%field2%;%field3%;%field4%)>file4.tmp Results: file1.tmp and file2.tmp are em...
- 10 Nov 2023 11:11
- Forum: DOS Batch Forum
- Topic: space is added to the file if it is after the extension
- Replies: 2
- Views: 14647
space is added to the file if it is after the extension
See this:
result:
After the 'text' there is a space.
Strange.
Saso
Code: Select all
@echo off
set str=some text
echo %str%>tmp.tmp &REM space before the & sign!!!
After the 'text' there is a space.
Code: Select all
some text
Saso
- 03 Nov 2023 10:47
- Forum: DOS Batch Forum
- Topic: Is it worth learning Powershell?
- Replies: 10
- Views: 34262
Re: Is it worth learning Powershell?
I'm surprised you aren't using VBScript for that Easy answer: because I don't 'speak' VBScript. I must say that PS (ImportExcel cmd-let) does the job but I am always open for new (faster?) options. Update: did some searching: there are ome VBScripts. I only have to export *one* column to csv. Saso