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. kokser

    Get mailbox itemcount for items with specific received date

    I have created a small script that can retrieve the itemcount for a mailbox. Is it possible to do the 2nd Where? The output should only be the number of mails received on a given date.
  2. kokser

    searching for file in folders/subfolders, permission denied

    Absolutely awesome! It works perfect! I used guitarzan's script and modified it with Geates last post, and now it works! I am very happy, this script will save me a lot of time :) Thank you both so much for helping :)
  3. kokser

    searching for file in folders/subfolders, permission denied

    I think you misunderstood me :) Making the script run from anything but C:\Users\any username\Desktop does not work. If I make it run from C:\Users (the goal) and using On Error Resume Next at each For Each loop the script will obviously finish, but not edit anything (I put rdp files in...
  4. kokser

    searching for file in folders/subfolders, permission denied

    I think you are starting to try and fix a lot of things that really work right now. The script works perfectly fine if I just tell it to run in C:\Users\any username\Desktop As I want to search through several users on many, many computers, I would simply like to be able to run in C:\Users\...
  5. kokser

    searching for file in folders/subfolders, permission denied

    I have made sure that the Administrators group has Full Access to the C: drive and all subfolders. My user is of course an administrator. I added the on error resume next, and the script did finish. Without changing any RDP files though. I added RDP files at different levels to see if it got...
  6. kokser

    searching for file in folders/subfolders, permission denied

    Didn't seem to work either :/ I am running out of ideas.
  7. kokser

    searching for file in folders/subfolders, permission denied

    This did not appear to work. First I tried copy/pasting yours, resulting in a Permission Denied at the first For Each. I then tried adding more excludes, but was still denied permission to whatever it is. I see your logic in iterating folders before files, but decided to try and switch it...
  8. kokser

    searching for file in folders/subfolders, permission denied

    I did not foresee that! Do you have any ideas to solve this? Perhaps it is possible to exclude a folder from the search?
  9. kokser

    searching for file in folders/subfolders, permission denied

    The user "dude" is the only administrator on this computer (I always rename administrator and delete all other users). I am running the script locally on my laptop for test purposes. This should not be a folder permission issue, as I have made sure to give my user and group Full Control of the...
  10. kokser

    searching for file in folders/subfolders, permission denied

    I see what you mean. I changed the script according, but nothing appears to have changed. This still works [quite] strDir = "C:\Users\dude\Desktop" Set FSO1 = CreateObject("Scripting.FileSystemObject") Set objDir = FSO1.GetFolder(strDir) getInfo(objDir) Sub getInfo(objDir) For Each aItem In...
  11. kokser

    searching for file in folders/subfolders, permission denied

    Thank you for the input. I added the code :) I tried removing the "\" but I am still denied permission to something in line 8.
  12. kokser

    searching for file in folders/subfolders, permission denied

    Here is my script This works perfectly fine. It searches the desktop and subfolders for RDP shortcuts, and edits the IP. I tried changing the strDir to a level higher, so C:\Users\dude\ but then I get Permission Denied at line 8 (first For Each). I tried changing to a bunch of difference...
  13. kokser

    Creating a dynamic, two-dimensional array

    Doing a very short test, this seemed to work. Set dicOverall = CreateObject("Scripting.Dictionary") Set objFSO = CreateObject("Scripting.FileSystemObject") Set objTextFile = objFSO.OpenTextFile("c:\vbs\csv.csv", 1, False) a = 1 Do Until objTextFile.AtEndOfStream aLine = objTextFile.ReadLine...
  14. kokser

    Creating a dynamic, two-dimensional array

    That's quite odd. I will look further into this.
  15. kokser

    Creating a dynamic, two-dimensional array

    Just tested that. It somehow manages to get the last line of the csv file, instead of the first. Can't quite figure out why, it seems pretty simple.
  16. kokser

    Creating a dynamic, two-dimensional array

    There we go, fixed it. Set dicOverall = CreateObject("Scripting.Dictionary") Const ForReading = 1 Set objFSO = CreateObject("Scripting.FileSystemObject") Set objTextFile = objFSO.OpenTextFile("c:\vbs\csv.csv", 1, False) Do Until objTextFile.AtEndOfStream aLine = "" strRest = "" aLine =...
  17. kokser

    Creating a dynamic, two-dimensional array

    haha, man that was quick! It does work quite well, and as you commented, I need to figure out a way to add that first line to every file. I will look into it on monday, I'm off from work. Thank you very much for the help!
  18. kokser

    Creating a dynamic, two-dimensional array

    I really have no idea how I would do that. I only know very simple scripting, but I will give it a go on monday! Lot's of googling shall be done.
  19. kokser

    Creating a dynamic, two-dimensional array

    Thanks. Now I'm getting a type mismatch for objTextFile.WriteLine instead :S
  20. kokser

    Creating a dynamic, two-dimensional array

    ADO records seem to be over the top for something this simple. I have no idea if this would actually work, but when I run the script I get told I lack permissions to write to the file. What do? Const ForReading = 1 Const ForAppending = 8 Set objFSO = CreateObject("Scripting.FileSystemObject")...

Part and Inventory Search

Back
Top