Sage 100

 View Only
  • 1.  VB script to show all file extensions with the MAS

    Posted 01-17-2013 11:13
    VB script to show all file extensions with the MAS item number as the filename? All the files are stored in one specified folder. The client sometimes has a pdf spec of the item, sometimes an xls, sometimes both, or something other than those. They wan to hit the button in Item Maintenance and have it bring windows explorer and list all the file types with filename = item number. I currently have a script that sequentially searches by specific file types (pdf, xls, xlsx) and opens that file with the appropriate app. But this does not solve the issue of both a pdf and xls for the same item number. Anyone got a handy script, or ideas? Thanks - Clark


  • 2.  RE: VB script to show all file extensions with the MAS

    Posted 01-17-2013 11:18
    Hmmm. How would you do that manually? Windows Explorer doesn't really have a filter option, does it? Maybe you could automate a search in that specific folder and get a search result window with just files that match the item #.


  • 3.  RE: VB script to show all file extensions with the MAS

    Posted 01-17-2013 13:11
    Can you open a window based on ....\mas90\filename.* (i.e. wildcard)


  • 4.  RE: VB script to show all file extensions with the MAS

    Posted 01-17-2013 13:19
    @JeffSchwenk that's a pretty much my question. If you can, I can think of a few scenarios where that would be handy.


  • 5.  RE: VB script to show all file extensions with the MAS

    Posted 01-17-2013 13:23
    Exactly my question, Gentlemen :) I found a script that can open a folder in windows explorer. And I found a script that opens the windows search window. I am looking for a script that will open the windows search window in a specific folder and find all the file extensions with a specific filename that I can pass in from the custom office variable for the item number. Keep those cranial gears a grindin'!


  • 6.  RE: VB script to show all file extensions with the MAS

    Posted 01-17-2013 13:44
    If you are in detail view in windows 7 you can filter by type. Now to script it...gears are grinding Clark!!


  • 7.  RE: VB script to show all file extensions with the MAS

    Posted 01-17-2013 15:26
    Suggestion, not tested or debugged: Set oFSO = CreateObject(""Scripting.FileSystemObject"") Set oFolder = oFSO.GetFolder(""C:\TheFolder"") Set sItemCode = ""Item"" For Each oFile in oFolder If Instr(oFile.Name,sItemCode) > 0 Then 'do whatever you need to with the file here End If Next


  • 8.  RE: VB script to show all file extensions with the MAS

    Posted 01-17-2013 15:30
    Wow, @PhilMcIntosh - does ""do whatever you need to here "" work in scripting??? Maybe I COULD try it!! ;-)


  • 9.  RE: VB script to show all file extensions with the MAS

    Posted 01-17-2013 15:31
    I just tried it. It didn't... :)


  • 10.  RE: VB script to show all file extensions with the MAS

    Posted 01-17-2013 15:33
    Okay then, never mind....


  • 11.  RE: VB script to show all file extensions with the MAS

    Posted 01-17-2013 16:08
    Only the licensed version does that....