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 Mike Lewis 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. cwsstins

    Get single row from TVF

    I got some help in another thread to create this table-valued function: CREATE FUNCTION dbo.GetAwdYrTbl () RETURNS @AwdYrTbl TABLE ( AwdYr VARCHAR(7) , YearID VARCHAR(2) , Nbr VARCHAR(1) ) BEGIN Declare @TodayYr VARCHAR (4) Declare @TodayMn VARCHAR (2) Declare...
  2. cwsstins

    Turn statement into View - table variable declare error

    THanks guys...the function did the trick!
  3. cwsstins

    Turn statement into View - table variable declare error

    I've got a query that works perfectly when run on its own and returns what I need it to. When I try to wrap it into a view as displayed below, I'm getting an error "Must declare the table variable "@AwdYrTbl" I'm sure this is some kind of syntax thing I'm doing wrong. How can I fix it? --...
  4. cwsstins

    Change ReadLine to include Mid in addition to Left

    That worked! Makes sense...thank you very much!
  5. cwsstins

    Change ReadLine to include Mid in addition to Left

    I've got working code (thanks to help from this forum) that will write to a file the first 42 characters of each line in numerous files. Works like a charm. However, I now have a need to also write characters from 10 other areas of each line. For instance, in the code below, i need to modify...
  6. cwsstins

    VBS MoveFile results in error

    One more question...I was testing this locally and it worked. When I changed the MainPath to a network share instead of hard drive, it doesn't work. Is that something to do with FileSystemObject and if so, how do I correct? Instead of this: MainPath = "C:\_Temp_Delete\Daily Reports" I need...
  7. cwsstins

    VBS MoveFile results in error

    This works perfectly! Thank you!!!
  8. cwsstins

    VBS MoveFile results in error

    Trying to write a script to move files with last month's date in the filename to an archive folder that exists in the same folder. For instance: C:\_Temp_Delete\Daily Reports\Report 1 folder --> this is where the file initially resides C:\_Temp_Delete\Daily Reports\Report 1...
  9. cwsstins

    Search multiple folders for filename using wildcard

    Sounds good, thanks again.
  10. cwsstins

    Search multiple folders for filename using wildcard

    Those two items did the trick! Thanks to all for your input and help, much appreciated.
  11. cwsstins

    Search multiple folders for filename using wildcard

    Then I'm confused as to why it works when i run it with the search path set to local drive. For the first sub (SearchFolders), I'm calling that when the user clicks a button. How can I subsequently call the ShowSubFolders sub after the SearchFolders sub runs? I would have thought the call to the...
  12. cwsstins

    Search multiple folders for filename using wildcard

    If it matters, my network share is already mapped as a drive.
  13. cwsstins

    Search multiple folders for filename using wildcard

    Thanks for your help guys, I think I'm almost there. I've gotten it to work locally when I have the path set to c:\prod\saig. However, when I change it to a network share, nothing happens. There is no error, it just doesn't write to the log. Also, my CompleteMsg sub runs for each file found, I...
  14. cwsstins

    Search multiple folders for filename using wildcard

    Thanks PHV. I just added that as the first line and now I'm getting the same msg "invalid procedure call or argument" but now getting it on the set objFolder = objFSO.GetFolder(strDir) line (line 6 in the code above).
  15. cwsstins

    Search multiple folders for filename using wildcard

    I thought the part in green was indicating that I didn't need it because it was redundant...when I run this, I get "invalid procedure call or argument" on the Set objTextFile: strDir = "c:\prod\saig" LogPath = "C:\Search_SAIG" set objFSO = CreateObject("Scripting.FileSystemObject") sub...
  16. cwsstins

    Search multiple folders for filename using wildcard

    Sorry guys, but I'm a bit confused. So for this code, if I run it on its own, I'm still not getting any results at all...I mean, I run the vbs file and...nothing. I'm sure it's something I'm doing wrong...this is what I'm running: strDir = "c:\prod\saig" LogPath = "C:\Search_SAIG" set objFSO =...
  17. cwsstins

    Search multiple folders for filename using wildcard

    Maybe I should have prefaced this post by saying that I don't really know what I'm doing...although that is probably fairly obvious from my responses. I had been trying to avoid using the function because I already have this code as part of a sub where I gather input from user (HTA wrapper) and...
  18. cwsstins

    Search multiple folders for filename using wildcard

    I think I'm almost there...the script will complete now, but it doesn't actually write to the file like I'm telling it to...which I assume means I'm not truly finding the right subfolder that contains my files? MainPath = "c:\prod\saig" Set oFolder = fso.GetFolder(MainPath) For each...
  19. cwsstins

    Search multiple folders for filename using wildcard

    Thanks Geates. But my problem is that I'm trying to avoid having to indicate the \\server\share piece. If I have to enter the full path, then I'll need to hard-code over 100 paths. So instead of this: n:\prod\00572\From-Other\YYYYMMDD-Download n:\prod\00573\From-Other\YYYYMMDD-Download...
  20. cwsstins

    Search multiple folders for filename using wildcard

    The closest thing I can find is a script that will recursively search every subfolder in a main folder. That is a problem for me because I need it to search only a specific subfolder within a subfolder within a subfolder with a folder (in my example above, 00572 has other subfolders, but I'm...

Part and Inventory Search

Back
Top