Search found 175 matches

by doscode
21 Apr 2023 15:45
Forum: DOS Batch Forum
Topic: Script for (u)mounting partition and open explorer
Replies: 2
Views: 2817

Script for (u)mounting partition and open explorer

Hello, I use Windows XP still. I would like to do the following. I have a file like video and I select it in file explorer. I copy it in context menu or by ctrl+c. Now I want to click on icon on my desktop to run a script. The script must to do the following: To mount a certain partition (now there ...
by doscode
27 Aug 2016 09:09
Forum: DOS Batch Forum
Topic: How to rename files like 00080.jpg to 01080.jpg?
Replies: 11
Views: 11210

Re: How to rename files like 00080.jpg to 01080.jpg?

Thanks. I think CMD is too much complicated for this kind of job. This is quite not easy. It is better to choose different language which is able to do it with very simple commands than using CMD. Using CMD, the fastest solution is what I suggested: to list the files and send it to bat file, which I...
by doscode
26 Aug 2016 11:25
Forum: DOS Batch Forum
Topic: How to rename files like 00080.jpg to 01080.jpg?
Replies: 11
Views: 11210

Re: How to rename files like 00080.jpg to 01080.jpg?

The file name is just number of video frames exported from video sequence to jpeg files. The 00000,jpg representes first frame, and some number like 000180.jpg is the last frame. So what i need to do is either to do mathematical calculation for all the frames (add a constant to variable number) 0001...
by doscode
26 Aug 2016 08:22
Forum: DOS Batch Forum
Topic: How to rename files like 00080.jpg to 01080.jpg?
Replies: 11
Views: 11210

Re: How to rename files like 00080.jpg to 01080.jpg?

I mean add one zero to left.
by doscode
26 Aug 2016 07:10
Forum: DOS Batch Forum
Topic: How to rename files like 00080.jpg to 01080.jpg?
Replies: 11
Views: 11210

Re: How to rename files like 00080.jpg to 01080.jpg?

I have explained it:

I need to change one digit from 0 to 1. That is the change. And I said files not one file.

It is clear from the example:
00080.jpg changed to 01080.jpg
by doscode
26 Aug 2016 06:01
Forum: DOS Batch Forum
Topic: How to rename files like 00080.jpg to 01080.jpg?
Replies: 11
Views: 11210

Re: How to rename files like 00080.jpg to 01080.jpg?

But I have hundreds of files like this.
Never mind, I found how to do it.
simply

Code: Select all

dir *.jpg /o:e /b > list.txt


I can replace it in editor.
by doscode
26 Aug 2016 04:48
Forum: DOS Batch Forum
Topic: How to rename files like 00080.jpg to 01080.jpg?
Replies: 11
Views: 11210

How to rename files like 00080.jpg to 01080.jpg?

I need to change one digit from 0 to 1.

Also another example would help how can I change files like 99080.jpg
to 099080.jpg
(add one zero to left).
by doscode
15 Jun 2016 01:47
Forum: DOS Batch Forum
Topic: How to delete file using deep search in Windows XP?
Replies: 4
Views: 5235

Re: How to delete file using deep search in Windows XP?

On Windows XP I cannot find the program. robocopy /? command does not exist.

RE: Foxidrive: That sounds quite easy. Thanks

It works like sharm:

Code: Select all

@cls
cd /d ".\"
del /s *.ilk *.pdb *.exp
pause


I place it to folder where and which subfolders I need to clear.
by doscode
14 Jun 2016 13:32
Forum: DOS Batch Forum
Topic: How to delete file using deep search in Windows XP?
Replies: 4
Views: 5235

How to delete file using deep search in Windows XP?

I have small disk space on one partition. In one folder there is lot of folders and sub-folders which sometimes contain a lot of files of these extensions: *.ilk, *.pdb, *.exp , I would like to delete these files but not to do it manually because that can be dangerous (I could simply delete other fi...
by doscode
31 May 2016 04:47
Forum: DOS Batch Forum
Topic: How to get output of program to variable?
Replies: 5
Views: 6347

Re: How to get output of program to variable?

Outside loop I tried to reference by %var% but because of the other errors it did not work. Now works. Thanks

Code: Select all

for /f "usebackq tokens=1" %%o in (`convert map2.png -format "%%wx%%h" info:`) do (
  set original_size_1=%%o )
echo %original_size_1%
by doscode
31 May 2016 04:07
Forum: DOS Batch Forum
Topic: How to get output of program to variable?
Replies: 5
Views: 6347

Re: How to get output of program to variable?

Thanks for you help. This is what I needed: for /f "usebackq tokens=1" %%a in (`convert map2.png -format "%%wx%%h" info:`) do ( echo %%a ) after I run the batch then this is the output: >for /F "usebac kq tokens=1" %a in (`convert map2.png -format "%wx%h" info...
by doscode
30 May 2016 16:16
Forum: DOS Batch Forum
Topic: How to get output of program to variable?
Replies: 5
Views: 6347

How to get output of program to variable?

Hello, I am using Windows XP and batch file where I have this command: convert map2.png -format "%%wx%%h" info: after executing it I see this: 256x158 and I need to save it to variable and then to paste content of the variable to next command: convert result.png -resize ...here to put the ...
by doscode
02 Sep 2013 00:28
Forum: DOS Batch Forum
Topic: diacritics in batch
Replies: 3
Views: 4857

Re: diacritics in batch

It results the same result. However I found mistake in my later command not CP1250 but CHCP 1250, that was a try to change it. My console displays the original script characters correctly, but the call command does not see them correctly. If I would use the line SET VS100COMNTOOLS=P:\programování\C+...
by doscode
01 Sep 2013 14:57
Forum: DOS Batch Forum
Topic: diacritics in batch
Replies: 3
Views: 4857

diacritics in batch

Can you help with this? I have a batch in Visual Studio which I need to compile programs. I found that the program cannot find path because it can not read correctly path. Folder in which it is placed is called "programování" but it sees as "programovßnÝ". I tried to type in the ...
by doscode
08 Aug 2013 16:26
Forum: DOS Batch Forum
Topic: proxy list downloader
Replies: 5
Views: 20770

Re: proxy list downloader

I found that the dowloader works but I need to add slash after http adress. I have lost two days till somebody noticed it .... But I have a need to correct my script a bit because I dont know when the downloaded page does not contain any proxies because no other results. So I should stop downloading...