Search found 8 matches

by avalancha
24 Aug 2010 02:56
Forum: DOS Batch Forum
Topic: Cutting numbers off a file name
Replies: 10
Views: 11466

Re: Cutting numbers off a file name

I KNEW it'd be smarter to do it with VBS... Thanks a lot ghost, you saved my day :D
by avalancha
24 Aug 2010 02:04
Forum: DOS Batch Forum
Topic: Cutting numbers off a file name
Replies: 10
Views: 11466

Re: Cutting numbers off a file name

download sed for windows , then you can do this C:\test>dir /B *csv a10bc12345.csv abc12345.csv C:\test>dir /B *csv | sed -r "s/[0-9]{5}\.csv/.csv/" a10bc.csv abc.csv use a for loop if desired. Note, this will not affect the digits mixed together with the alphabets. Damn, looks nice, but ...
by avalancha
24 Aug 2010 00:30
Forum: DOS Batch Forum
Topic: Cutting numbers off a file name
Replies: 10
Views: 11466

Re: Cutting numbers off a file name

First, get rid of the "@"'s and turn echo on and see what it's trying to do. Second, I'm not sure that the first for loop works with embedded double quotes. (But I'm not sure -- I've never tried the way you have it.) I would do: *untested* cd /d "d:\documents and settings\.....\test&...
by avalancha
23 Aug 2010 05:42
Forum: DOS Batch Forum
Topic: Cutting numbers off a file name
Replies: 10
Views: 11466

Cutting numbers off a file name

Hey everyone, I need a batch-file that modifies some file names for me. The files all look like this: abcd12345.csv and I have to get rid of the numbers. It's also always the same amount of numbers that I have to cut off. So far I found this: for %%i in (D:\"Documents and Settings"\....\te...
by avalancha
26 Mar 2010 00:56
Forum: DOS Batch Forum
Topic: Batch file doesn't process parameter
Replies: 6
Views: 8455

Re: Batch file doesn't process parameter

Jep, sure did.
You know, I'm rather a C programmer and quite new to this stuff... I had never heard about this parameter before, therefore again: tanks

Patrick
by avalancha
25 Mar 2010 14:16
Forum: DOS Batch Forum
Topic: Batch file doesn't process parameter
Replies: 6
Views: 8455

Re: Batch file doesn't process parameter

ok well talking already about understanding... so what does the

Code: Select all

%~dp0
mean?
"Look in the same folder" or something similar?

Greetings my friend :mrgreen:
by avalancha
25 Mar 2010 12:25
Forum: DOS Batch Forum
Topic: Batch file doesn't process parameter
Replies: 6
Views: 8455

Re: Batch file doesn't process parameter

yea I knew "/wait" before but hey:
oh... my... god
you are the BEST!!!! It works!!

Du kannst dir nicht vorstellen was für einen Gefallen du mir grade getan hast und wie viele Tage Rumgemurkse damit zu Ende gehen! DANKE!

Best regards,
Patrick
by avalancha
25 Mar 2010 04:26
Forum: DOS Batch Forum
Topic: Batch file doesn't process parameter
Replies: 6
Views: 8455

Batch file doesn't process parameter

Hey out there! I have a quiestion concerning a .bat of mine and I hope this is the right spot to post it: My task is the following: I need to write a batch that starts an Access database and processes a parameter to it so that a module I created can catch it as the following: If Command = "test...