Search found 51 matches

by lalat06bag
09 Jul 2019 10:14
Forum: DOS Batch Forum
Topic: copy file
Replies: 3
Views: 5483

Re: copy file

Thank you for helping me out. Kindly suggest.

this is coping and replacing. no issues with that. I am looking for this message

Overwrite \\xxx.xlsx? (Yes/No/All): Y
1 file(s) copied.

But this shows

XXX.xlsx
XXX.xlsx
2 file(s) copied.


Thanks,
by lalat06bag
08 Jul 2019 16:03
Forum: DOS Batch Forum
Topic: copy file
Replies: 3
Views: 5483

copy file

Hi,

I need help in this.

i want to copy files from one directory to another. The only check is, if the file exists, it would overwrite else it would just copy. The actions should be logged in a log file with the file name.

Thank you!
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: 7365

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: 7365

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: 7365

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: 7365

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: 7365

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: 2402

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: 3454

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: 3454

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: 7994

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: 7994

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: 7994

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: 7994

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