Jump to content

Making an folder end with a dot


Recommended Posts

Hi, there is a little trick, making an AUTORUN.INF folder with in that folder a folder, ending with a dot..

This makes the folder not valid, wich makes it unable to use/delete it. Perfect for disabling the autorun.inf virus.

How do I create a folder ending with a dot? :unsure:

Whatever I try, AutoIt keeps creating a normal folder, ignoring the dot.

Thnx in advance :P

Link to comment
Share on other sites

#include <Process.au3>

$tVal = _MakeDir (@ScriptDir & '\.test')
If @error Then
    MsgBox (48, "Error", "Directory could not be made.")
EndIf

Func _MakeDir($sDir)
    
    _RunDOS ("mkdir " & '"' & $sDir & '"')
    If @error Then
        SetError (1)
        Return -1
    Else
        Return 1
    EndIf
    
EndFunc

I believe it can only be done through the command line :P

Link to comment
Share on other sites

Dampe, you put a dot before the foldername, not after.

@detected - I don't believe it's possible. Technically, foldernames without an extension are 'seen' as ending in 'dot'. Any filenames or foldernames with trailing dots and/or spaces are truncated to the last non-whitespace non-dot character. I've done a number of experiments with this - through explorer, AutoIT, and the command prompt. I just don't think what you're looking to do is possible.

But then, I've been proven wrong before..

Link to comment
Share on other sites

#include <Process.au3>

$tVal = _MakeDir (@ScriptDir & '\.test')
If @error Then
    MsgBox (48, "Error", "Directory could not be made.")
EndIf

Func _MakeDir($sDir)
    
    _RunDOS ("mkdir " & '"' & $sDir & '"')
    If @error Then
        SetError (1)
        Return -1
    Else
        Return 1
    EndIf
    
EndFunc

I believe it can only be done through the command line :P

Making a folder which ends in '.' using the command prompt doesn't work on my XP SP3.

I believe that if you have an Apple computer on your network which can write to your folder then the Apple can create a folder which ends with '.'. Maybe other OS's can as well. If the folder name is longer than 8 characters you can remove it by renaming it from the command prompt using the 8-character name and then you can delete it. To see the short folder names from the command prompt you can use

Dir /AD /x

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Dampe, you put a dot before the foldername, not after.

@detected - I don't believe it's possible. Technically, foldernames without an extension are 'seen' as ending in 'dot'. Any filenames or foldernames with trailing dots and/or spaces are truncated to the last non-whitespace non-dot character. I've done a number of experiments with this - through explorer, AutoIT, and the command prompt. I just don't think what you're looking to do is possible.

But then, I've been proven wrong before..

It is possible :P

Posted Image

I just can't find out how they do it :unsure:

Maybe by adding an invalid character after the dot? (You know,... The ones that end out becomming a square)

But how do I get that character? I know that there are some characters that are invisible if you add them in a file/foldername!

Edited by detected
Link to comment
Share on other sites

I don't know how that happens actually. This is interesting :hmm:

They do it so the autorun.inf virus cannot overwrite the AUTORUN.INF folder..

When you try to rename or remove the folder you get a error that it's not a valid folder.

Really nice technique, can't find it anywhere on the internet!

Or maybe I'm just using the wrong words to search for it :P

Link to comment
Share on other sites

Dampe, you put a dot before the foldername, not after.

@detected - I don't believe it's possible. Technically, foldernames without an extension are 'seen' as ending in 'dot'. Any filenames or foldernames with trailing dots and/or spaces are truncated to the last non-whitespace non-dot character. I've done a number of experiments with this - through explorer, AutoIT, and the command prompt. I just don't think what you're looking to do is possible.

But then, I've been proven wrong before..

Hah.. I just realised this now :P my bad.

Making a folder which ends in '.' using the command prompt doesn't work on my XP SP3.

I believe that if you have an Apple computer on your network which can write to your folder then the Apple can create a folder which ends with '.'. Maybe other OS's can as well. If the folder name is longer than 8 characters you can remove it by renaming it from the command prompt using the 8-character name and then you can delete it. To see the short folder names from the command prompt you can use

Dir /AD /x

After noticing I stupidly didn't read the original post properly I attempted to alter the function I wrote, and no deal on SP2 for a . at the end.
Link to comment
Share on other sites

  • 5 months later...

Hah.. I just realised this now >_< my bad.

After noticing I stupidly didn't read the original post properly I attempted to alter the function I wrote, and no deal on SP2 for a . at the end.

I know this is a bit old but I stumbled on it and thought I would answer.

echo Hi > "\\?\C:\File with Dots..."

mkdir "\\?\C:\Folder with Dots..."

Link to comment
Share on other sites

I know this is a bit old but I stumbled on it and thought I would answer.

echo Hi > "\\?\C:\File with Dots..."

mkdir "\\?\C:\Folder with Dots..."

>_< genius.... nice find lewcamino.

working with files and folders like this is tricky, but not impossible.

Edited by Mobius

wtfpl-badge-1.png

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...