Search found 3879 matches

by Squashman
11 Dec 2018 08:18
Forum: DOS Batch Forum
Topic: Batch file does not continue running commands
Replies: 2
Views: 25

Re: Batch file does not continue running commands

That is a loaded question. You need to better explain what your real task is and why you think you need to use CMD /k. Because you seem to want to use CMD /K, this would be your only option. @ECHO OFF cmd.exe /k "winver &exit" PAUSE So you need to explain why you wouldn't just run this? @ECHO OFF cm...
by Squashman
10 Dec 2018 16:15
Forum: DOS Batch Forum
Topic: Get current directories
Replies: 3
Views: 25

Re: Get current directories

You can also just type the CD command.

Code: Select all

H:\temp\temp>cd
H:\temp\temp
by Squashman
10 Dec 2018 11:41
Forum: DOS Batch Forum
Topic: How to pass Yes automatically in a batch script?
Replies: 3
Views: 41

Re: How to pass Yes automatically in a batch script?

The FORFILES command is grabbing files and folders. When the script tries to delete a folder it will prompt you with that. It will not prompt to delete files.
by Squashman
09 Dec 2018 21:19
Forum: DOS Batch Forum
Topic: Burn ISO to USB command
Replies: 4
Views: 33

Re: Burn ISO to USB command

Why do you need to do this from the command prompt? Microsoft created a tool to boot from USB drives to install Windows. Why not use that. It has been around since Windows Vista if memory serves me.
by Squashman
09 Dec 2018 21:18
Forum: DOS Batch Forum
Topic: Batch subtraction with leading zero
Replies: 2
Views: 33

Re: Batch subtraction with leading zero

Been covered dozens of times on the forum if you search.

Put a 1 in front of the number so that it become 108. Then subtract 1. Then substring the last two positions.
by Squashman
09 Dec 2018 16:41
Forum: DOS Batch Forum
Topic: Adding a column to a csv file and populating it
Replies: 21
Views: 12740

Re: Adding a column to a csv file and populating it

I'd also like to chime in with my problem, maybe you can help a total newbie out: I have a dir with several csv files, each named after a company. Now I want to add that filename (minus the .csv) as the first colum inside the csv (which can have different number of rows, from 4 to 600+). The delimi...
by Squashman
06 Dec 2018 13:42
Forum: DOS Batch Forum
Topic: Creating a folder with today's date
Replies: 4
Views: 75

Re: Creating a folder with today's date

My teaching style is to teach a man to fish. It really helps to know all the commands you can use within a batch file. You can type help at a command prompt to get most of them. H:\>help For more information on a specific command, type HELP command-name ASSOC Displays or modifies file extension asso...
by Squashman
06 Dec 2018 12:49
Forum: DOS Batch Forum
Topic: Creating a folder with today's date
Replies: 4
Views: 75

Re: Creating a folder with today's date

I would assume you are aware of the %date% and %time% variables. But those are both region dependent and may not output the same on everyone's computer. So the other option is to use WMIC to get the date and time because it always outputs in the same format on all computers regardless of region sett...
by Squashman
28 Nov 2018 16:30
Forum: DOS Batch Forum
Topic: About call Function with Arguments
Replies: 3
Views: 116

Re: About call Function with Arguments

When file and folder names have spaces in them, what are you supposed to do?
by Squashman
28 Nov 2018 13:38
Forum: DOS Batch Forum
Topic: How to create an UTF-8 file (instead of UCS-2 Little Endian)?
Replies: 3
Views: 80

Re: How to create an UTF-8 file (instead of UCS-2 Little Endian)?

I thought we had a thread going on the forum about creating a UTF-8 file with a BOM. I can't find it.
by Squashman
28 Nov 2018 13:33
Forum: DOS Batch Forum
Topic: How to I replace " by ' " (at the start and end of a string in a variable)? Doubling Backslashes?
Replies: 4
Views: 73

Re: How to I replace " by ' " (at the start and end of a string in a variable)? Doubling Backslashes?

If you have control over the code why would you assign the double quotes to the variable in the first place. That has never been a best practice on this forum.
by Squashman
27 Nov 2018 14:10
Forum: DOS Batch Forum
Topic: CSV.BAT - CSV file manipulation with SQL syntax
Replies: 33
Views: 6893

Re: CSV.BAT - CSV file manipulation with SQL syntax

npocmaka_ wrote:
27 Nov 2018 13:42
It would be useful if you can use/create a custom schema file in order to handle other data types than string.
I thought Rojo explained how to do that in this thread because I had asked him about it.
by Squashman
24 Nov 2018 17:15
Forum: DOS Batch Forum
Topic: Lazy DOS interface for Python SCDL-CANT EDIT ANYMORE
Replies: 2
Views: 76

Re: Lazy DOS interface for Python SCDL-CANT EDIT ANYMORE

I am not understanding what you mean by DOS interface and DOS file.