Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

stupid DOS question (xp_cmdshell only link to SQL)

Status
Not open for further replies.

skicamel

Programmer
Dec 24, 2001
126
US
I tried posting this in the Windows forum (can't find a DOS one anywhere). Here's the issue. I've got a number of web pages on an intranet at work. I can't access the server from home. Though I CAN get to it through our billing server by using xp_cmdshell and a linked server to the intranet server. An employee just got laid off, I took out his securities. Now the tech manager has gotten him to stay on. They called me at home to tell me his securities need to be set back up... No problem on the other securities accessible outside the firewall, however...

I'm using apache/php on a windows box inside the firewall. I can 'type' the .htaccess file to the screen in query analyzer using xp_cmdshell, but of course I can't edit it. Is there a way to append to a text file by way of a dos command prompt? I'm posting here as this is the only forum I've gotten every question I've posed answered. Terry? Anyone?

Thanks yet again folks.

Dan
 
Hi,

If you do something like DIR > Filename.txt that will create a new file called FileName.txt and have the contents of the current directory. If you do DIR >> Filename.txt what you get is the original file plus the contents of the current directory on the end.

Best of luck,
Tom

 
Thanks Tom. I wasn't aware of being able to print a dir listing to a text file. Good to know.

Tsuji gave me another answer that more suits my purposes in thread181-671634:

>type 123.txt >> 456.txt
>echo append this text >> 456.txt

Thanks again, all.

Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top