Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Batch - Pushd & executing script?
Name: mflair2000 Date: May 20, 2009 at 07:11:21 Pacific OS: Windows Vista Subcategory: Batch
Comment:
hello; i'm having a bit of an issue executing a script on a mapped drive; after using PUSHD; can someone please take a look.
declare @CMDSQL varchar(4000)
declare @ScriptDrive varchar(4000)
declare @ScriptLocation varchar(4000)
declare @ScriptName varchar(4000)
set @ScriptLocation = '\\MappedDrive\Database\'
set @ScriptDrive = 'D:'
set @ScriptName = 'cleanupJob.vbs'
set @CMDSQL = 'pushd ' + @ScriptLocation + ' & ' + 'cscript ' + @ScriptLocation + @Scriptname
print @CMDSQL
EXEC master..xp_CMDShell @CMDSQL
Summary: tonysathre: I think that it depends on the task you want to do. For automation of tasks i would belive batch is superior since the programs/tools are already written. The batch script just executes th...
Summary: Mechanix2Go, A better example than the one above would be: ---%temp%\~atempfile.tmp VARIABLES Date=%date% Time=%time% Name=%stringName% --- I want to store variables, from batch file execution, into a...
Summary: Hi guys .. worked on it yesterday and today and it works. I used three files. One Batch file, two script files for the telnet client Thanks for all the help .. ::How it works: :: :: .Batch file is r...