Inserachof
asked on
What type of file is created when done thru CMD file
I created the following batch file to run on a daily basis thats send me an email with an attached file, One email goes to my blackbery email address and the other goes to my personal email
When I get the email on my personal desktop email on my blackberry cell I can not open the attachement I get this message (unable to retrieve) Now on the blackberry cell when I get the email to my blackberry email address I have no problem opening the attachment.
I can open attachments like photos work docs spreadsheets no problem on my blackberry desktop email (my personal email account)
The problem is the file I am creating using this batch file is having the issue. It is a .txt file
I haave sent myself other .txt (notepad) files and had no problem
I run this on a Windows 2003 R2 Enterprise 64bit SP2 Server
Use a batch utility febooti which send the email using smtp
I even ran from a command prompt using febooti with an txt file and it worked
Again only the ,txt file that is create from the followin batch file I can not open
Here is the cmd file
del c:\util\*.log
del c:\util\report.txt
del c:\util\reportA.txt
xcopy "C:\Documents and Settings\Administrator.ABC \Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data\*.log" c:\util
dir c:\util\*.log /b /od >c:\util\ordered.txt
echo %date% >c:\util\copylogx.txt
echo %time% >>c:\util\copylogx.txt
type c:\util\copylog.txt >>c:\util\copylogx.txt
for /f "skip=9" %%1 IN (ordered.txt) do rename %%1 current.log
rem current.log is Unicode, so won't go in a text message
type c:\util\current.log >c:\util\%dtt%.log
type c:\util\current.log >c:\util\report.txt
rem above converts current.log from Unicode to ascii
copy c:\util\current.log c:\util\reportA.txt /A
xcopy %dtt%.log "C:\Documents and Settings\Administrator.ABC \Desktop\S upport Files\Backuplogs\"
rem Send email with status of job
c:\util\febooti\febootimai l -from testuser@tabc.com -to mycelll@vzw.blackberry.net -msg "Open attachment for Report" -subj "Server Weekly Backup" -attach report.txt -smtp 192.1681.26
c:\util\febooti\febootimai l -from testuser@abc.com -to desktop@abc.com -msg "Open attachment for Report" -subj " Server Weekly Backup" -attach reportA.txt -smtp 192.168.1.26
rem delete *.bkf files older than 21 days
forfiles /p "D:\Server Backup\Server" /m *.bkf /d -21 /c "cmd /c del @path"
del c:\util\ordered.txt
del c:\util\copylogx.txt
exit
I have tried different options on the copy command /A /R no luck
One more thing I have the sma eproblem when using a PS1 file that creates a .txt output file can not up the aattachment
Any ideas or thoughts
Tom
When I get the email on my personal desktop email on my blackberry cell I can not open the attachement I get this message (unable to retrieve) Now on the blackberry cell when I get the email to my blackberry email address I have no problem opening the attachment.
I can open attachments like photos work docs spreadsheets no problem on my blackberry desktop email (my personal email account)
The problem is the file I am creating using this batch file is having the issue. It is a .txt file
I haave sent myself other .txt (notepad) files and had no problem
I run this on a Windows 2003 R2 Enterprise 64bit SP2 Server
Use a batch utility febooti which send the email using smtp
I even ran from a command prompt using febooti with an txt file and it worked
Again only the ,txt file that is create from the followin batch file I can not open
Here is the cmd file
del c:\util\*.log
del c:\util\report.txt
del c:\util\reportA.txt
xcopy "C:\Documents and Settings\Administrator.ABC
dir c:\util\*.log /b /od >c:\util\ordered.txt
echo %date% >c:\util\copylogx.txt
echo %time% >>c:\util\copylogx.txt
type c:\util\copylog.txt >>c:\util\copylogx.txt
for /f "skip=9" %%1 IN (ordered.txt) do rename %%1 current.log
rem current.log is Unicode, so won't go in a text message
type c:\util\current.log >c:\util\%dtt%.log
type c:\util\current.log >c:\util\report.txt
rem above converts current.log from Unicode to ascii
copy c:\util\current.log c:\util\reportA.txt /A
xcopy %dtt%.log "C:\Documents and Settings\Administrator.ABC
rem Send email with status of job
c:\util\febooti\febootimai
c:\util\febooti\febootimai
rem delete *.bkf files older than 21 days
forfiles /p "D:\Server Backup\Server" /m *.bkf /d -21 /c "cmd /c del @path"
del c:\util\ordered.txt
del c:\util\copylogx.txt
exit
I have tried different options on the copy command /A /R no luck
One more thing I have the sma eproblem when using a PS1 file that creates a .txt output file can not up the aattachment
Any ideas or thoughts
Tom
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
No it does not work I tryied Copy ./A and Copy /R no luck
I thought maybe using PS1 instead of the cmd file but that does not help either
I thought maybe using PS1 instead of the cmd file but that does not help either
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Just tried the type method and still nothing
attached is the batch file and result file report.txt
report.txt
emailstats.cmd
attached is the batch file and result file report.txt
report.txt
emailstats.cmd
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I know been fighting with this one for a long while
I sent both txt report.txt and reporta.txt to three (3) different emails
1. blackberry email both opened
2. yahoo email both opened
3. my exchange email on outlook both opened
4. my exchange email (desktop) on my cell both failed unable to retrieve
when you reopen the email on the desktop icon on my cell it shows the status of
Mailbox couldn't find original message,if forwarding or replying please resend the message
the saga continues
I sent both txt report.txt and reporta.txt to three (3) different emails
1. blackberry email both opened
2. yahoo email both opened
3. my exchange email on outlook both opened
4. my exchange email (desktop) on my cell both failed unable to retrieve
when you reopen the email on the desktop icon on my cell it shows the status of
Mailbox couldn't find original message,if forwarding or replying please resend the message
the saga continues
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
No No No
I am running Exchange 2007 entrprise server 64 bit SP3 not 5.5
I am running Exchange 2007 entrprise server 64 bit SP3 not 5.5
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
FEBOOTI has a probloem sending attached files to a blackberry thier support does not have any blackberry service to test with had to use
-MSG -USEFILE mailboxesA.txt
This places the contents of mailboxesA.txt into the body of the email and thats is working
Would like to have the attachment work but this will do for now...
-MSG -USEFILE mailboxesA.txt
This places the contents of mailboxesA.txt into the body of the email and thats is working
Would like to have the attachment work but this will do for now...
ASKER
It has to be the way the file is created but I am not sure