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.
Batch: Find and delete a substring
Name: shuser Date: February 23, 2004 at 18:50:08 Pacific OS: Win XP CPU/Ram: x86 256MB
Comment:
I need to find a substring in the passed in argument (%1) and delete it.
For example, when I do this (batch file is dotest.bat): C:>dotest test_file.txt In dotest.bat, I need to delete .txt if it exists. So if they pass in only test_file for 1st arg, I don't want to do anything. But if they pass in test_file.txt for 1st arg, I need to extract only test_file (delete .txt from 1st arg).
I would really appreciate if anyone you help me...
Summary: I'm trying to write a batch file that will loop repeatedly every two minutes (using a multiple ping to a non-existent IP for delay). It will effectively move files over the network to an NT 4.0 ser...
Summary: Is there any way that you can tell DOS to go into a certain drive on a server, find the oldest version of a file, and remove it? For example, Ive got .. Foo10.db 2/26/02 Foo09.db 2/25/02 Foo08.db 2/24...