Search found 49 matches

by lalat06bag
04 Mar 2019 14:59
Forum: DOS Batch Forum
Topic: How to eliminate the spaces in a line in a text file
Replies: 9
Views: 502

Re: How to eliminate the spaces in a line in a text file

Thank you a lot , Team! it worked perfectly fine.
by lalat06bag
28 Feb 2019 20:50
Forum: DOS Batch Forum
Topic: How to eliminate the spaces in a line in a text file
Replies: 9
Views: 502

Re: How to eliminate the spaces in a line in a text file

to avoid confusion, i am giving the exact input in the text file and exact output would be. Sorry, my example confused. Please read the dashes as blank spaces. text file name : test.txt Input: blue-red---------------------fox apple-banana-orange green-------------------------------------------------...
by lalat06bag
28 Feb 2019 20:27
Forum: DOS Batch Forum
Topic: How to eliminate the spaces in a line in a text file
Replies: 9
Views: 502

Re: How to eliminate the spaces in a line in a text file

1. I have this requirements. Please dont count by the exact characters given in the example. I am in a critical situation and need this urgently.
2. in example, i have said "say".
3. yes, space at the beginning would be added in line 4 and 5.
by lalat06bag
28 Feb 2019 19:42
Forum: DOS Batch Forum
Topic: How to eliminate the spaces in a line in a text file
Replies: 9
Views: 502

Re: How to eliminate the spaces in a line in a text file

Hi, blue red-------------------------------------------------------------------fox apple banana orange green-------------------------------------------------------------------- house ----------------------------------------------------------------- red orange ----------------------------------------...
by lalat06bag
28 Feb 2019 15:53
Forum: DOS Batch Forum
Topic: How to eliminate the spaces in a line in a text file
Replies: 9
Views: 502

How to eliminate the spaces in a line in a text file

H, I need help in building a program for a text file. The text file has few lines. I want to count each line, if any line length exceeds 40 characters, i need to eliminate the spaces in between the words and just keep a single space between the words. If the line started with spaces too and it excee...
by lalat06bag
15 Feb 2019 10:56
Forum: DOS Batch Forum
Topic: How to write the output to the log file?
Replies: 1
Views: 184

How to write the output to the log file?

Hi,

I am running the below piece of code and want to write the output to the log file. please help.

forfiles /s /m *.* /c "cmd /c Del /q /s @path" /d -90

Thanks!
by lalat06bag
10 Dec 2018 13:55
Forum: DOS Batch Forum
Topic: How to pass Yes automatically in a batch script?
Replies: 3
Views: 361

Re: How to pass Yes automatically in a batch script?

correct. Thank you. now i made that silent by passing /Q.
by lalat06bag
10 Dec 2018 11:19
Forum: DOS Batch Forum
Topic: How to pass Yes automatically in a batch script?
Replies: 3
Views: 361

How to pass Yes automatically in a batch script?

Hi,

I have this piece of code.

SET "NASS=\\abc"
SET "TEMPDIR=%NASS%\CU\OR"
PUSHD "%TEMPDIR%"
forfiles /s /m *.* /c "cmd /c Del @path" /d -90
POPD

While executing, it asks \\abc\CU\OR\*, Are you sure (Y/N) ? and the job stops there till the input is provided.

Now how to pass Y in the above code?
by lalat06bag
16 Nov 2018 08:17
Forum: DOS Batch Forum
Topic: batch script for deleting files 90 days older
Replies: 7
Views: 765

Re: batch script for deleting files 90 days older

Hi, While running this script, we figured out that we need to keep few files irrespective of their dates. I have below files which we need to keep. They are all ending with -en-us. sorry for bugging. kindly see. All files older than 90 days will be removed except the below ones ending with -en-us. e...
by lalat06bag
09 Nov 2018 15:15
Forum: DOS Batch Forum
Topic: batch script for deleting files 90 days older
Replies: 7
Views: 765

Re: batch script for deleting files 90 days older

Thank you a ton! This worked perfectly fine!
by lalat06bag
08 Nov 2018 16:43
Forum: DOS Batch Forum
Topic: batch script for deleting files 90 days older
Replies: 7
Views: 765

Re: batch script for deleting files 90 days older

Hi, I tried this with the local path, it worked perfectly fine. But when given a share drive path, it shows me an error as Error: UNC paths (\\machine\share) are not supported. here is What I am trying. SET "NASS=\\abc" SET "TEMPDIR=!NASS!\CU\OR" forfiles /p "%TEMPDIR%\OR" /s /m *.* /c "cmd /c Del @...
by lalat06bag
08 Nov 2018 14:29
Forum: DOS Batch Forum
Topic: batch script for deleting files 90 days older
Replies: 7
Views: 765

batch script for deleting files 90 days older

Hi,

I want to delete the files in a folder which are more than 90 days older based on the date modified column in the folder in a batch script. Please help.

Thanks
by lalat06bag
02 Oct 2018 09:48
Forum: DOS Batch Forum
Topic: need help in creating a batch script to run a procedure
Replies: 1
Views: 642

need help in creating a batch script to run a procedure

I want to create a batch script to run a database procedure and give me the results in a flat file. I am using exadata. I want to run the batch from a remote windows server. 1. Below is the procedure sp_analyze_wt.sql CREATE OR REPLACE PROCEDURE x.sp_analyze_x AUTHID DEFINER AS BEGIN dbms_stats.gath...