Search found 4 matches

by babhuko
21 Nov 2012 08:31
Forum: DOS Batch Forum
Topic: how to write content separated by comma in a text file
Replies: 10
Views: 5742

Re: how to write content separated by comma in a text file

@foxidrive I have used your datetime code. but still the same issue. Please advise @echo off SET DATE_DIS=none for /f "delims=" %%a in ('wmic OS Get localdatetime ^| find "."') do set dt=%%a set DATE_DIS=%dt:~0,8%_%dt:~8,6% move %1%3 %2 cd %2 rename %3 %3_%DATE_DIS% pause
by babhuko
19 Nov 2012 09:35
Forum: DOS Batch Forum
Topic: how to write content separated by comma in a text file
Replies: 10
Views: 5742

Re: how to write content separated by comma in a text file

@foxidrive,

Thanks for your info. Could you please let me know how to avoid that error.

I mean l have given DATE_DIS = %date%%time%. Any other format there like only with numerals to avoid this issue.

For eg
yyyymmddhhmiss

Please advise.

Thanks
by babhuko
19 Nov 2012 06:23
Forum: DOS Batch Forum
Topic: how to write content separated by comma in a text file
Replies: 10
Views: 5742

Re: how to write content separated by comma in a text file

Thanks for the reply. Its working. I have another issue. @echo off SET DATE_DIS=none set DATE_DIS=%date%%time% move %1%3 %2 cd %2 rename %3 %3_%DATE_DIS% pause In this error is in the rename command. I dont know what it is. %3 is the filename am passing as a parameter from ETL tool. Before rename it...
by babhuko
17 Nov 2012 08:01
Forum: DOS Batch Forum
Topic: how to write content separated by comma in a text file
Replies: 10
Views: 5742

how to write content separated by comma in a text file

Hi all,

I executed the command

DIR *.csv \b > sample.txt

The output is
file1.csv
file2.csv
file3.csv

But i need output like
file1.csv,file2.csv,file3.csv

Note : After file3.csv, comma should not be there. Please throw some light on this. Thank you..

Regards,
babhuko