Search found 554 matches

by miskox
26 Jul 2010 04:32
Forum: DOS Batch Forum
Topic: Removing quotes...
Replies: 12
Views: 11333

Removing quotes...

I have a string:

Code: Select all

set tmpstring="String with ^^ character"


Question: how to remove quotes but ^^ should remain there. If I use %~ then one ^ gets removed.

Thanks,
Saso
by miskox
26 Jul 2010 04:27
Forum: DOS Batch Forum
Topic: echo <FF> (to screen or a file)
Replies: 7
Views: 8525

Re: echo <FF> (to screen or a file)

Thanks Jeb. I did check that - but I admit - too complex for me. For now there is no solution.
This problem does not have a highest priority at the moment.

Thanks,
Saso
by miskox
26 Jul 2010 04:26
Forum: DOS Batch Forum
Topic: I want to create a batch file (.bat) that changes [file name
Replies: 4
Views: 6039

Re: I want to create a batch file (.bat) that changes [file

I agree with phillid.

aGerman was not doing anything wrong. He just warns against the 'file locked' conflict.

Saso
by miskox
22 Jul 2010 07:59
Forum: DOS Batch Forum
Topic: echo <FF> (to screen or a file)
Replies: 7
Views: 8525

echo <FF> (to screen or a file)

Hi all, I would like to echo a FORMFEED control code to a screen (or a file). echo X* causes me problems because NOTEPAD does not like x0C (wants to save a file in Unicode). If I save it as ANSI I get a plus (+) sign. * replace X with an ALT+12 on the numeric keypad so you get a FORMFEED control cod...
by miskox
19 Jul 2010 03:19
Forum: DOS Batch Forum
Topic: Randomly generated file names
Replies: 4
Views: 5289

Re: Randomly generated file names

Replace

Code: Select all

set "oldname=<oldname.txt"


with

Code: Select all

FOR /F %%i IN (oldname.txt) DO set oldname=%%i


Saso
by miskox
12 Jul 2010 06:34
Forum: DOS Batch Forum
Topic: Detecting same file size and deleting
Replies: 6
Views: 6379

Re: Detecting same file size and deleting

I would suggest using fc /b file1 file2 >nul 2>nul for this. I have a batch file for finding .pdf files from different (sub)folders and I compare them with .pdf files that are located in ONE folder only. But files in (sub)folders have different filenames than the one in ONE folder. I make a list of ...
by miskox
01 Jul 2010 01:08
Forum: DOS Batch Forum
Topic: How to pickup null value in variable
Replies: 3
Views: 4847

Re: How to pickup null value in variable

aGerman always supplies complete answers. Maybe in one line you need this:

Code: Select all

if "%input%"=="" echo Empty string entered.


Hope this helps.

Saso
by miskox
30 Jun 2010 00:36
Forum: DOS Batch Forum
Topic: BEWARE OF SPAM
Replies: 3
Views: 4902

Re: BEWARE OF SPAM

I hope Admin will do something about this. Phpbb forums are easy to hack (according to google searches).

The problem is that it is very easy to steal passwords from all of us.

It is never good to read such posts.

Saso
by miskox
29 Jun 2010 15:32
Forum: DOS Batch Forum
Topic: BEWARE OF SPAM
Replies: 3
Views: 4902

BEWARE OF SPAM

As you can see this forum got hacked (see user ReteddyOdor).

Admin, please take appropriate actions.

Saso
by miskox
28 Jun 2010 15:10
Forum: DOS Batch Forum
Topic: Need some help with explanation
Replies: 5
Views: 6095

Re: Need some help with explanation

Speaking of explanations... Can somebody please explain these two things: set "line=..." What is the purpose of using a " (Quotation_mark) before the variable name? and set "line=echo.%%..." What is the purpose of the echo. command (besides echoing an empty line when by itse...
by miskox
28 Jun 2010 15:03
Forum: DOS Batch Forum
Topic: How to replace special characters...
Replies: 4
Views: 11637

Re: How to replace special characters...

Thank you both.

I will check this tomorrow (it is late here).

I just want to extract a URL from the line above. The main problem is always with those special characters...

Thanks again.
Saso
by miskox
28 Jun 2010 07:16
Forum: DOS Batch Forum
Topic: How to replace special characters...
Replies: 4
Views: 11637

How to replace special characters...

Hi all, let's say we have a file tmp.tmp with the following records (there are some blanks (spaces) infront of the <a title): <a title="some text" href="http://some.site.com/somefile1.jpg" target="_blank">somefile1.jpg</a> This file contains some lines as above with som...
by miskox
28 Jun 2010 05:09
Forum: DOS Batch Forum
Topic: How to get string length (two possibilites)
Replies: 1
Views: 3635

How to get string length (two possibilites)

Hi all, here are two possibilites to determine the string's length. I hope you like them. First version sets a temporary variable and when it becomes undefined the counter determines the string's length. Of course string is passed as %1 (first parameter). @echo off set strorg=%~1 set strtmp= set /a ...
by miskox
28 Jun 2010 03:54
Forum: DOS Batch Forum
Topic: Delete files which matches to the pat tern
Replies: 2
Views: 4223

Re: Delete files which matches to the pat tern

Can't a simple

Code: Select all

del *test*.*


do for you?

Saso