pastebin - collaborative debugging tool
kpaste.net RSS


rename file to directory
Posted by z0TK on Thu 16th Sep 2010 23:19
raw | new post

  1. Set fso = createobject("Scripting.FileSystemObject")
  2. Set root = fso.getfolder("C:\folder\")
  3. for each folder in root.subfolders
  4. foldername = folder.name
  5. for each file in folder.files
  6.   ext = right(file.name,4)
  7.   file.name = foldername & ext
  8. next
  9. next

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at