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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. kirk124

    Hi , I'am trying to update a

    Hi , I'am trying to update a text file. But somehow it does not work. I gets the following error: Can't "next" outside a block at PersonalfrmList.pl Here a snippet of my code: open(IN,"c:\\h\\CSSCS\\bin\scripts\\ListofFile.txt")|| die "Can't open ListofFile.txt...
  2. kirk124

    Executing a system command

    Hi, Is there a way to execute a system command and read the output through a while loop using the back tick. Normally I excute a command like this. ie System(&quot;ls > ls.txt&quot;); open RI,&quot;<ls.txt&quot; || die &quot;can't open ls.txt: $!\n&quot;; while(.....) {...
  3. kirk124

    Matching on a string

    ...I need to verify that the string I am reading in has &quot;\\&quot; follow by either characters or numbers then &quot;\&quot; then either characters or numbers. I try it as: if ( $string =~ /\\\\.*\\.*/) { print&quot;match\n&quot;; } But it did not work. thanks in advance.
  4. kirk124

    Get printer information using vbscript

    Hi, I have the name of a printer. Is there a way through vbscript that I can display the information about this particular printer. thanks
  5. kirk124

    getting hostname of pc using vbscript

    Hi Does anyone know a way in vbscript to get the hostname of a pc. I know you can execute &quot;ipconfig -all&quot; on command line but I want to do it it vbscript. Also is there a way to find if the printer connected to my pc is a local or a network printer
  6. kirk124

    Get printer information through command line

    Hi Is there a command I can execute on command line to find out if a printer which is accessible to my pc is a local or network printer.
  7. kirk124

    Outputting to a file using vbscript

    ...& strComputer & &quot;\root\cimv2&quot;) Set colInstalledPrinters = objWMIService.ExecQuery _ (&quot;Select * from Win32_Printer&quot;) For Each objPrinter in colInstalledPrinters Wscript.Echo &quot;Name: &quot; & objPrinter.Name Wscript.Echo &quot;Location: &quot; & objPrinter.Location...
  8. kirk124

    Matching for set of numbers

    Hi, Hi , I have the following data in a text file: Net to Media Table Device IP Address Mask Flags Phys Addr ------ -------------------- --------------- ----- --------------- hme0 192.45.10.250 255.255.255.255 08:00:09:40:0d:05 hme0...
  9. kirk124

    Problem with string manipulation

    Hi: I am having problem turning the string &quot;c:\/data/CDS/BCS3Lite&quot; into &quot;c:\\data\\CDS\BCS3Lite&quot;. Someone suggest &quot;s#[/\\]#\\\\#g&quot; but this caused the string to become &quot;c:\\\\data\\CDS\\BCS3Lite&quot;. Not what I wanted. --thanks
  10. kirk124

    Simple substitution

    Hi, How can I do a substitution to change &quot;c:\tmp/sup&quot; to &quot;c:\\tmp\\sup&quot;. I tried s/\/|\\/\\\\/ but it did not work. --thanks
  11. kirk124

    Executing perl script at bootup

    Hi, I want windows 2000 to execute a perl script at bootup . But when I add the command to do so to the autoexec.bat and reboot nothing happen. When I ran the autoexec.bat on the command line my perl script is executed. Can anybody tell me how I can get a perl script executed at bootup...
  12. kirk124

    Executing perl in the background

    Hi, Is there a way I can run a perl script in the background without the DOS window popping up. --thanks
  13. kirk124

    Searching file for a set of strings

    Hi, I want to find out if a file contain the following strings: set CMP_DATA_INBND_DIR=C:\h\csscs\data\commi\tmp_queue set CMP_DATA_OUTBND_DIR=C:\h\CMP\data\outbound set JAVA_HOME=C:\h\COTS\JAVA2\1.3 set CSSCS_DATA=C:\h\csscs\data and if not to add them to the file. So if the first three...
  14. kirk124

    Updating Window environment variables

    Hi, Does anyone how to PERMENANTLY update the window environment variables with Perl. For example if my PATH=c:\h\TOCBS\bin; How can I make it PATH=c:\h\TOCBS\bin\;c:\Banner; --thanks
  15. kirk124

    File search problem

    ...The folder in particular is 'c:\\WINNT'. Here a snippet: finddepth (\&rename_file_dir , &quot;c:\\&quot; ); sub rename_file_dir { if( /(.*)csscs_ref(.*)/i )# any files or directories { $orig = $File::Find::name ; $concat = $File::Find::dir ...
  16. kirk124

    Search and update script take too long !

    ...sub rename_file_dir { if( /(.*)$old_hostname(.*)/i )# any files or directories { $orig = $File::Find::name ; print &quot;rename_file_dir : $orig\n&quot;; $concat = $File::Find::dir . &quot;\/$1$new_hostname$2&quot...
  17. kirk124

    Determining folder (directory) or file type

    Hi, Is there a way to determine whether a folder or file is a system folder or system file?
  18. kirk124

    String substitution

    thanks icrf, it works.
  19. kirk124

    String substitution

    I am trying to update a text file. I have to substitute every word that consists of the word &quot; apple&quot; with &quot;orange&quot;. For example: darkapplelite tapple &&%apple098 etc becomes darkorangelite torange &&orange098 ...
  20. kirk124

    String substitution

    Hi, The strings &quot;data/applered&quot; or &quot;new_apple_dark&quot; are just example the strings might be any characters or noncharacters follow by the word apple like the following&quot; bag/applered bag/appleold --/apple0123 !#&apple$%%

Part and Inventory Search

Back
Top