Computing.Net > Forums > Programming > editing a txt file using cdm

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

editing a txt file using cdm

Reply to Message Icon

Name: Freeky78
Date: April 10, 2009 at 03:11:42 Pacific
OS: Windows 2000
Subcategory: Batch
Comment:

Hi,

I'm looking for a simple batch file which will edit - delete a part of text a file, lets say arhiv.dat. With a command %date& > arhive.dat I get a file with system date, with a writen name of the day and numbers of the date. What command could I use, to delete the day name, so only numbers would stay.

Thanks



Sponsored Link
Ads by Google

Response Number 1
Name: Valerie (by Garibaldi)
Date: April 10, 2009 at 04:34:06 Pacific
Reply:

If your date format is "day nn/nn/nnnn" create the date in the file using:

Echo %date:~-10% > arhiv.dat


0

Response Number 2
Name: Freeky78
Date: April 10, 2009 at 05:03:57 Pacific
Reply:

It gives the following error:

'10.04.2009' is not recognized as an internal or external command, operable program or batch file.

Am I doing something wrong?


0

Response Number 3
Name: Valerie (by Garibaldi)
Date: April 10, 2009 at 05:22:45 Pacific
Reply:

Code is working perfectly here, what are you doing?


0

Response Number 4
Name: Freeky78
Date: April 10, 2009 at 05:29:32 Pacific
Reply:

Sorry, my bad. I left out one little sign ~, and now it works perfect.

Thank you, saved me!!!


0

Response Number 5
Name: Valerie (by Garibaldi)
Date: April 10, 2009 at 05:31:53 Pacific
Reply:

Thanks for coming back to report your success..

Have a nice weekend.

V..


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: editing a txt file using cdm

batch to edit a txt file www.computing.net/answers/programming/batch-to-edit-a-txt-file/15327.html

Editing a txt file, renaming files www.computing.net/answers/programming/editing-a-txt-file-renaming-files/16242.html

Editing a Hex file using a Batch script www.computing.net/answers/programming/editing-a-hex-file-using-a-batch-script/19381.html