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: crahn
  • Order by date
  1. crahn

    Delete Empty Folders after removing files

    Testing the Script in a live environment. Thank you for all your help!
  2. crahn

    Delete Empty Folders after removing files

    I had assistance from PHV, in completing most of the script below. It was not part of the original request to delete said folders after removing files. I have tried numerous configurations like what is highlighted below, does anyone know the correct placement and/or code to complete said task...
  3. crahn

    VBScript to delete files with limits

    Current script is as follows, it will delete a folder if it is "already" empty but will not remove files then delete the folder. Do I just have it in the wrong location? This was not part of the original request, would it be better if I create a new topic? thanks again Set fso =...
  4. crahn

    VBScript to delete files with limits

    Perfect, that resolved the issue of deleting the files residing in the test1 and test2 folders.
  5. crahn

    VBScript to delete files with limits

    Yes, I just tested again. It is deleting files from the second "test2" directory but is not on the first "test1".
  6. crahn

    VBScript to delete files with limits

    Thank you for the fast responses and sorry for my late response. The script is almost complete. 1 issue discovered is files that reside in the test1 & test2 folder are being deleted. 2nd issue found is deleting the folders once they are empty. Set fso =...
  7. crahn

    VBScript to delete files with limits

    This code is searching the correct directories test1 and test2, the only remaining issue that I currently see is it is also finding the folders that do not start with "20". Is this possible? Thank you for taking the time to work on this. Set fso = CreateObject("scripting.filesystemobject")...
  8. crahn

    VBScript to delete files with limits

    My thought process was search for 2 characters from left to right for the folder name that starts with 20, since the subfolders where I want to delete subfolders all start with 20 (20010322, 20030322, 20110322). Directory structure if it helps is z:\test1\20010322\data\files and...
  9. crahn

    VBScript to delete files with limits

    const fldname = "Z:\"" points to the Main directory where test1/test2 reside. I have tried are; If Left(folder.Name, 2) = "20" Or left(folder.parentfolder.name, 2) ="20" Then But I am not sure if I just put it in the wrong location of the script or if the logic is off or what have you
  10. crahn

    VBScript to delete files with limits

    There are files that go back many years. The files are under a drive with 2 "Main" sub directories (test1 and test2). The test1 and test2 folders have thousands of subfolders with a named date format IE 20010329. Said example subfolder has numerous files and subfolders. I am attempting to...

Part and Inventory Search

Back
Top