Hi. I am trying to write a query where the results can be copied into a batch file. I need the two strings/commands to be on their own lines. I am trying this:
Copy specific file to c:\temp
then run c:\program files\export\export.exe
then copy the next file, etc...
I am copying my query results to notepad, Microsoft Word, etc, but not getting a carriage return with char(13) + char(10). It actually just inserts two spaces so I get this:
copy 12345.tif c:\temp\*.* "c:\program files\export\export.exe"
copy 12346.tif c:\temp\*.* "c:\program files\export\export.exe"
instead of this:
copy 12345.tif c:\temp\*.*
"c:\program files\export\export.exe"
copy 12346.tif c:\temp\*.*
"c:\program files\export\export.exe"
I would love to actually make each string on it's own line in the results window so I can just save the file as I need. Not sure if this is even possible.
Any ideas?
Thanks!
Brian
Copy specific file to c:\temp
then run c:\program files\export\export.exe
then copy the next file, etc...
Code:
select 'copy ' + filename + ' c:\temp\*.*' + char(13) + char(10) + ' "c:\program files\export\export.exe"'
from mytable
I am copying my query results to notepad, Microsoft Word, etc, but not getting a carriage return with char(13) + char(10). It actually just inserts two spaces so I get this:
copy 12345.tif c:\temp\*.* "c:\program files\export\export.exe"
copy 12346.tif c:\temp\*.* "c:\program files\export\export.exe"
instead of this:
copy 12345.tif c:\temp\*.*
"c:\program files\export\export.exe"
copy 12346.tif c:\temp\*.*
"c:\program files\export\export.exe"
I would love to actually make each string on it's own line in the results window so I can just save the file as I need. Not sure if this is even possible.
Any ideas?
Thanks!
Brian