I need help desperately, I need a batch?

October 4, 2010 at 00:43:08
Specs: Windows xp

I am newbie, and I need a cmd batch file, or anything that can help that does the following...


open files in the folder "\user\myfile" with notepad.

in the notepad find "DAC" match case, Match word,

if you find DAC,

cut and paste file (not the word itslef but the file) ---> folder "user\gotofile\DAC folder"

rename file to todays date, if file exist,

rename file to todays date with suffix "a",

example, instead of 091010 it would be 091010a

if file 091010a exist,

rename file to todays date with b and so on. c, d, e

Go to the next file and find DAC again, if DAC is not found move to the next file

if DAC is found and do THE SAME AGAIN.

next step...

pipe to


open files in the folder "\user\myfile" with notepad.

in the notepad find "EMO" match case, Match word,

if you find EMO,

cut and paste file (not the word itslef but the file) ---> folder "user\gotofile\EMO folder"

rename file to todays date, if file exist,

rename file to todays date with suffix "a",

example, instead of 091010 it would be 091010a

if file 091010a exist,

rename file to todays date with b and so on. c, d, e

Go to the next file and find EMO again, if EMO is not found move to the next file

if EMO is found and do THE SAME AGAIN.

-----thanks..


See More: I need help desperately, I need a batch?

Report •


#1
October 4, 2010 at 06:16:22
"I am newbie, and I need a cmd batch file or anything that can help that does the following..."

Google your questions one by one, you will learn alot.

Search for: rename files with cmd
Search for: copy files with cmd
Search for: IF, IF NOT, ELSE statement with cmd

The best way to learn it is to do it by yourself.

MUs,

Sup.


Report •

#2
October 5, 2010 at 22:45:52
I am having trouble, when I found the phrase on a given textfile using findstr, how do I get the "3 lines before and 3 lines after" the found phrase on the given textfile. ... I look in google.. and I could not find the answer.

say the textfile contains...

DONT TAKE 23423
GET ME!234
GET ME!543
GET ME!123
HEY FILE
GET ME!DFS
GET ME!SDF
GET ME!DSD
DONT TAKE ME234
DONT TAKE ME343

then I do the command [findstr /c:"HEY FILE" >> getmephrase.txt]

--------------------------------
but I need the complete phrase below to go to my getmephrase.txt

GET ME!234
GET ME!543
GET ME!123
HEY FILE
GET ME!DFS
GET ME!SDF
GET ME!DSD


Need help...



Report •
Related Solutions


Ask Question