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 strongm 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: *

  • Users: Nu2Java
  • Content: Threads
  • Order by date
  1. Nu2Java

    Copy Excel Columns to New Workbook

    Hi All, I am trying to copy 3 columns from an existing workbook and paste those columns to a NEW workbook, but I am getting errors that the method of PasteSpecial failed. Here is what I have right now, which does seem to create the new workbook and paste the values in, but then fails to save...
  2. Nu2Java

    vbscript remove line from text file if duplicate found

    Hi All, I am using a vbscript file to count lines of data for a specific date. Based on this sample data from my text file, how can I remove lines that contain a duplicate after the first comma? 8-879003-02_TOP,B1021,218,149,4/18/2022 5:37:24 AM 8-879003-02_TOP,B1022,403,80,4/18/2022 6:11:50...
  3. Nu2Java

    Trim filenames in folder from specific character

    I am using this code to trim filenames. I cannot figure out how to expand this to trim ALL files in the folder after the first SPACE from the left in the filename. Before: 41-010 Rev A.txt After: 41-010.txt My Code: strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer...
  4. Nu2Java

    Combine text files with conditions

    I have this script for combining text files which works fine, but I have hit a big road block. I have a directory that contains approx 500 text files that I need to combine with a condition. I have many "pairs" of files that are job files where the name is like "JOB-A-TOP" & "JOB-A-BTM". I need...
  5. Nu2Java

    Format Text Files in a Folder

    Hello, I have some code here that I have been using to format a single text file by stripping out all the junk I don't want in the file. This works great, but now I want to just do this process for ALL text files in a folder. I was trying to add a loop but keep getting errors at the "InFile"...
  6. Nu2Java

    VBScript Update Excel with date and convert cell to text

    Hello, I am trying to update an Excel cell with a date using the script below which works fine. I need to read the Excel cell from another program but the program is ignoring the cell formatting unless I set the cell as TEXT. So 04/14/2016 needs ro be converted to 042016 which is the format I...
  7. Nu2Java

    Change String - Add and Replace Characters

    Hi, I am hoping the experts can point me in the right direction on this one. I have never attempted this and do not know where to begin. Is this a regular expression function? I don't know.... so here is what I need to do: Change this: CR4-7,CR10,CR40-42 To This...
  8. Nu2Java

    VBScript Method to check date in Text File

    Hi, can someone point out to me where I am going wrong in this code? I am simply trying to check a date in a text file and compare it to today. If the date is older than today then tell me. I don't know why I am getting strange results with my code. Is there a shorter way to check this...
  9. Nu2Java

    InStr not finding last line of text file

    I have some code here to count lines containing the previous days date and a word. I am hoping someone can tell me what is wrong with my code. For some reason when I search for the previous day (which is usually the last several lines of the text file), the code does not see the last line of the...
  10. Nu2Java

    Combine Text Files in Current Directory

    Hello, I am not very familiar with this line of code and how to modify it with a variable. Set FileList = objWMIService.ExecQuery _ ("ASSOCIATORS OF {Win32_Directory.Name='C:\Temp'} Where " _ & "ResultClass = CIM_DataFile") How do I change the line for the path to use a variable...
  11. Nu2Java

    Count Qty in String from Multiple Lines in Text File

    Hello, I am going to have hundreds of text files that I will be merging into a single text file. All of the files contain this line of text: 4-956170-10,Qty:,5,Dropped:,5/14/2014 1:59:36 PM,Completed:,5/14/2014 2:00:39 PM How can I read the "5" next to Qty and total that up from the...
  12. Nu2Java

    Delete Lines from Text File that DO NOT contain...

    Hello, I have a fairly large text file that I need to clean up to remove lines that are not needed. I have played around with a regex script, but I cannot figure how to get to the location of the line that I need to look at. Here is the current format where I need to delete the lines after the...
  13. Nu2Java

    Multiple Bluetooth Barcode Scanners to InputBox

    I have 4 Bluetooth Barocde scanners that are also capable of connecting as a Serial Port connection. Right now I am collecting data from the scanners through a single inputbox on four computers that will then update a single text file. What I am wondering is... is it possible to run a script for...
  14. Nu2Java

    Task Kill not running

    I have a simple script here where I am just matching two inputbox values. I am playing a buzzer sound with windows media player if they do not match and then I am attempting to kill the player after it plays and then return to my script. I have tried putting the task kill in several spots but...
  15. Nu2Java

    vbYESNO - Select Case? Or ?

    Hi there... I have this code to set Folder attributes, but I have not done a lot with FUNCTIONS. I want this to popup a YES or NO for the user to run it or not. I am not sure if Select Case is the way to go or if there is a better way to write this script. I have had several versions so far...
  16. Nu2Java

    Create Folders From Text File and add Sub Folders

    Hello, I am creating folders in a directory from a list of part numbers in a text file. Right now I am using a batch file that is run within each folder created manually, but is not very efficient. I have not gotten in to multiple directories and subdirectory creation. Here is what I am trying...
  17. Nu2Java

    Set File Permissions on External Drive

    Hi, does anyone know of a vbscript that will set permissions on an external hard drive that contains a Windows OS partition? I have had several occasions where I have upgraded a PC with a new hard drive and fresh install of Windows and the person wants to keep the old drive data and access it as...
  18. Nu2Java

    Add semi-colon to lines of text file via inputbox

    Hi.. I have a text file that is used to control a machine. From time to time, I need to edit the file to remove some functions in the machine program. What I need is to be able to add a semicolon to the controls in the program and then reverse this action when I am finished, since the changes...
  19. Nu2Java

    Search for string in textfile and place text below it

    I have new text files that I need to make updates to on a regular basis. What I need is to find a line of text and then append below that line three additional lines like this: 'Search for this line which has hundreds of lines below it M8010 (Tool Head DOWN) Once found, enter these lines...
  20. Nu2Java

    Popup message before printing

    Hi, does anyone know of a script that would detect printing to a network printer and show a popup that says "Are you sure you want to print?" OR "Are you sure you want to print (400) pages?". There has been countless times where people have hit the print button without paying attention to the...

Part and Inventory Search

Back
Top