Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Search & Log path+filenames that are too long (Profiles)


Recommended Posts

Posted

Due to a few problems where Roaming profiles have failed to load. I've written a script that uses a target folder as a search base and then scans for any file paths that are overly long and likely to cause an error.

 

The script has a few variables that need to be edited as follows:

 

  • debugme = 0
    Set this to a value of 1 if you want verbose echo pop ups while running the script
    .
  • objStartFolder = "\\school\target"
    Set this to the target folder you wish to scan (the script scans all sub-folders/files too)
    .
  • strLogDirectory = "\\school\log_folder"
    Set to the folder where you log will be saved
    .
  • strLogFile = "\overlongfiles.txt"
    Set to the log filename you want to use.

 

Note: The script will create the log folder and file if they don't exist already

 

In terms of functionality, all the script does is scan and log the paths... It won't truncate the names automatically or anything else reasonably "clever".

 

Hope it's of some use though.

 

Martin

longfn_logger.vbs

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...