Search found 175 matches

by doscode
18 Feb 2012 09:50
Forum: DOS Batch Forum
Topic: how to rename files
Replies: 18
Views: 14415

Re: how to rename files

You run an antivirus program without understanding it, I'm sure. You probably run dozens of utility programs without seeing the code. It is in my nature, that I always try to understand code. Not satisfied if have long code which I do not know how it works. Better to know it, to make own way next t...
by doscode
18 Feb 2012 06:23
Forum: DOS Batch Forum
Topic: how to rename files
Replies: 18
Views: 14415

Re: how to rename files

Yeah, it is for one off task, not regular. And I must understand things before I run them. But this seems too complicated. I would like to simplify it. It seems to me the u2d.com is not necessary. There are no poison characters in description, only slash "/" possibility. But the slash is n...
by doscode
18 Feb 2012 06:01
Forum: DOS Batch Forum
Topic: how to rename files
Replies: 18
Views: 14415

Re: how to rename files

Would it be possible to save the output of command to variable instead to > "temp.tmp"?
by doscode
17 Feb 2012 16:02
Forum: DOS Batch Forum
Topic: how to rename files
Replies: 18
Views: 14415

Re: how to rename files

Code: Select all

echo hD1X-s0P_kUHP0UxGWX4ax1y1ieimnfeinklddmemkjanmndnadmndnpbbn>u2d.com


I thought that this operator > is used to write data to some file. So why should not this overwrite the u2d.com ? It gives no sense to me.
by doscode
17 Feb 2012 05:51
Forum: DOS Batch Forum
Topic: how to rename files
Replies: 18
Views: 14415

how to rename files

Hello, I have files *.html like "Collection-396.html". Every file contains description which is like "<title>Aasiaat (BGAA)</title>". Is any way how to get the title, for example "Aasiaat (BGAA)" and to rename the html filenames to their titles? So the resulting file wo...
by doscode
16 Feb 2012 08:04
Forum: DOS Batch Forum
Topic: for in DOS batch - MSFN Forum
Replies: 10
Views: 8546

Re: for in DOS batch - MSFN Forum

Well, the first part where I tried to echo was OK and working. But then I tried to rename files beginning by some string for example _K_ENR_ and to remove this string from the name of file so the filename was not changed at all or incorrectly.
by doscode
16 Feb 2012 06:54
Forum: DOS Batch Forum
Topic: for in DOS batch - MSFN Forum
Replies: 10
Views: 8546

Re: for in DOS batch - MSFN Forum

I originally thought that this command is working correctly, rename %%x\BG_AD_3_BG*.pdf _*.pdf but not. Probably, when I tested it, I missed something. Edit - foxidrive: Just little change to actual situation in my directory: pushd "C:/program files/GnuWin32/bin" for /f "delims="...
by doscode
16 Feb 2012 06:01
Forum: DOS Batch Forum
Topic: for in DOS batch - MSFN Forum
Replies: 10
Views: 8546

Re: for in DOS batch - MSFN Forum

Yet I wanted to rename the files, and tried it this way: for /r ".\www.slv.dk\Dokumenter\dsweb\Get" %%x in (.) do rename "%%~x\_K_ENR_*.pdf" _*.pdf ::for /r ".\www.slv.dk\Dokumenter\dsweb\Get" %%x in (.) do rename %%x\EK_ENR_*.pdf _*.pdf But none of this works. When I r...
by doscode
16 Feb 2012 05:24
Forum: DOS Batch Forum
Topic: for in DOS batch - MSFN Forum
Replies: 10
Views: 8546

Re: for in DOS batch - MSFN Forum

Thank you. Thats great!
by doscode
15 Feb 2012 14:20
Forum: DOS Batch Forum
Topic: for in DOS batch - MSFN Forum
Replies: 10
Views: 8546

for in DOS batch - MSFN Forum

Hello, I try to be as sort as possible. I try to do some code in batch and cmd.exe (running Windows). Nwo I try the basic: I try to echo subdirectories listed in a folder. for /r %%x in (.\www.slv.dk\Dokumenter\dsweb\Get) do echo "%%x\" This should list the directories in Get folder. I kno...