06-13-2012
Maybe a way to cheat the rules
Are you familiar with PC Windows?
Read up on scheduling tasks (accessories, system tools, scheduled tasks)
[note, some versions of windows might be a bit different to get there]
Create a scheduled task to run some 1.bat file
In normal operation, this 1.bat file will do no work
Now, on unix, create a text file of your 1.bat file to run on Windows
ftp it to your PC
Now, at the next scheduled execution, it will run.
Some things to think about:
may want to create a 2.bat
have the last line of 1.bat call 2.bat
but, the 2.bat file deletes the 1.bat file you just moved and ran once
AND, makes the 1.bat into its do-nothing original format
10 More Discussions You Might Find Interesting
1. UNIX Desktop Questions & Answers
Is it possible to start a windows applications such as mail merge in word from a unix machine (sco-unix, digital osf).
Why to do this ?
Most people known word to create nice documents, but we want to print this documents with our information (name, adresses etc..
like a mailing. This info... (9 Replies)
Discussion started by: Dplancke
9 Replies
2. Shell Programming and Scripting
I have created get_list.bat file containing following line:
dir /B /O-d >file_list.txt
I am executing ftp command from Unix box and transferring get_list.bat file to windows server.
In my next ftp command I am trying to execute this test.bat file by entering this line:
get_list
or by... (9 Replies)
Discussion started by: alx
9 Replies
3. Windows & DOS: Issues & Discussions
Hello,
Is there a way to trigger a Windows bat file or program on a different machine from a different UNIX server using KSC file?
I hope you can assist me with this.
Thanks! (0 Replies)
Discussion started by: punyenye
0 Replies
4. UNIX for Dummies Questions & Answers
Hi, can you run a windows bat file or a VBscript from a shell script?
#!/bin/sh
PATH=/
$PATH/test.bat (1 Reply)
Discussion started by: cmac
1 Replies
5. UNIX for Dummies Questions & Answers
I have two machines, one running Windows and another one Unix over a network. I want to execute a batch file on the Windows machine using a script running on the Unix machine.
I have tried creating a rsa key and transferrring it to the destination machine but it doesn't work. The purpose was to... (3 Replies)
Discussion started by: MobileUser
3 Replies
6. Programming
I'm very new to c++ & unix programming. I have a c++ exe that runs on the unix box, but I am trying to write a c++ windows app that executes the program on unix. I have tried execv(), but it doesn't seem to work or I'm doing something wrong. Would really like to see examples if at all possible. ... (5 Replies)
Discussion started by: ch5082
5 Replies
7. UNIX for Advanced & Expert Users
Hi
Can anyone tell if it is possible to connect from Unix to t a remote windows environment and run a .bat script.
Do SSH/SFTP... serve my purpose..if s how....
if not which commands or scripts will help with my requiremnt.
points on this are greatly honoured.
Thanks in advance.
:) (1 Reply)
Discussion started by: lakshmis10
1 Replies
8. Windows & DOS: Issues & Discussions
I'm trying to open multiple IE windows and enter the same text and press <enter> on each. Here's an example with what I have so far.
REM Open
@echo on
start http://10.1.1.1
ping 1.1.1.1 -n 5 -w 1000 >nul
@echo password
start http://10.1.1.2
ping 1.1.1.1 -n 5 -w 1000 >nul
@echo password... (2 Replies)
Discussion started by: Pitt
2 Replies
9. Shell Programming and Scripting
Hi,
I am new to this forum and this is my first post.
I want to know that if I make an application in Tk (version of Tcl to create GUI) in windows and want to run to UNIX server, is it possible ?
In other words, can I access a UNIX server through a Tk application running on windows ?
... (1 Reply)
Discussion started by: ratneshnagori
1 Replies
10. Windows & DOS: Issues & Discussions
I have compiled an application called tmesh.exe, that was compiled for the cygwin, win7 platform. I wonder, if I do that outside X window, Is there a chance that I can run it on the command prompt of windows 7? (tmesh:4048): Gtk-WARNING **: cannot open display: THANKS Jack (3 Replies)
Discussion started by: lucky7456969
3 Replies
LEARN ABOUT CENTOS
file::which
File::Which(3) User Contributed Perl Documentation File::Which(3)
NAME
File::Which - Portable implementation of the `which' utility
SYNOPSIS
use File::Which; # exports which()
use File::Which qw(which where); # exports which() and where()
my $exe_path = which('perldoc');
my @paths = where('perl');
- Or -
my @paths = which('perl'); # an array forces search for all of them
DESCRIPTION
"File::Which" was created to be able to get the paths to executable programs on systems under which the `which' program wasn't implemented
in the shell.
"File::Which" searches the directories of the user's "PATH" (as returned by "File::Spec->path()"), looking for executable files having the
name specified as a parameter to "which()". Under Win32 systems, which do not have a notion of directly executable files, but uses special
extensions such as ".exe" and ".bat" to identify them, "File::Which" takes extra steps to assure that you will find the correct file (so
for example, you might be searching for "perl", it'll try perl.exe, perl.bat, etc.)
Steps Used on Win32, DOS, OS2 and VMS
Windows NT
Windows NT has a special environment variable called "PATHEXT", which is used by the shell to look for executable files. Usually, it will
contain a list in the form ".EXE;.BAT;.COM;.JS;.VBS" etc. If "File::Which" finds such an environment variable, it parses the list and uses
it as the different extensions.
Windows 9x and other ancient Win/DOS/OS2
This set of operating systems don't have the "PATHEXT" variable, and usually you will find executable files there with the extensions
".exe", ".bat" and (less likely) ".com". "File::Which" uses this hardcoded list if it's running under Win32 but does not find a "PATHEXT"
variable.
VMS
Same case as Windows 9x: uses ".exe" and ".com" (in that order).
Functions
which($short_exe_name)
Exported by default.
$short_exe_name is the name used in the shell to call the program (for example, "perl").
If it finds an executable with the name you specified, "which()" will return the absolute path leading to this executable (for example,
/usr/bin/perl or C:PerlBinperl.exe).
If it does not find the executable, it returns "undef".
If "which()" is called in list context, it will return all the matches.
where($short_exe_name)
Not exported by default.
Same as "which($short_exe_name)" in array context. Same as the `where' utility, will return an array containing all the path names matching
$short_exe_name.
BUGS AND CAVEATS
Not tested on VMS or MacOS, although there is platform specific code for those. Anyone who haves a second would be very kind to send me a
report of how it went.
File::Spec adds the current directory to the front of PATH if on Win32, VMS or MacOS. I have no knowledge of those so don't know if the
current directory is searced first or not. Could someone please tell me?
SUPPORT
Bugs should be reported via the CPAN bug tracker at
<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=File-Which>
For other issues, contact the maintainer.
AUTHOR
Adam Kennedy <adamk@cpan.org>
Per Einar Ellefsen <pereinar@cpan.org>
Originated in modperl-2.0/lib/Apache/Build.pm. Changed for use in DocSet (for the mod_perl site) and Win32-awareness by me, with slight
modifications by Stas Bekman, then extracted to create "File::Which".
Version 0.04 had some significant platform-related changes, taken from the Perl Power Tools `which' implementation by Abigail with
enhancements from Peter Prymmer. See <http://www.perl.com/language/ppt/src/which/index.html> for more information.
COPYRIGHT
Copyright 2002 Per Einar Ellefsen.
Some parts copyright 2009 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
File::Spec, which(1), Perl Power Tools: <http://www.perl.com/language/ppt/index.html>.
perl v5.16.3 2009-09-26 File::Which(3)