- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
I built a fortran win app to deal with worms that hide files and tranform the USB flashdik into a .lnk file. My app cleans all the files and folders attributes, deletes the virus and the .lnk file. After that all the files are inside an unnamed folder created by the worm. Does anyone knows how can I change the folder name using command line commands? I tried everythingbut I wasn't able to acess the folder contents with a command line command because it has no name. If this is not possible, it is possible to use xcopy to grab all the folder contents without grab the unnamed folder also?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Why use command line commands? There are simple APIs you can use to get folder listings and rename folders and files. In the Fortran library there's GETFILEINFOQQ and RENAMEFILEQQ, or you can call the Windows API directly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a lot Steve
I was using command line inside a fortran function (silently). But I will follow your sugestions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I used renamefileqq but I couldn't acces that folder. At windows the folder is "g:\here is nothing\" (as an example). So, how can we access this folder if the folder is unnamed?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I did some web searching and see that the folder may not really be unnamed - but that the name appears blank. It really has a name of the character ALT-255.
Did you use GETFILEINFOQQ and look carefully at the results (in a debugger memory view so you can see the hex)? It may just be an unprintable character. See http://forum.notebookreview.com/windows-os-software/330970-deleting-unnamed-folder.html for example./
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are right. that is "alt+255" character. I didn't use already the getfileinfoqq. But do you know how do we get access to the folder if the character is unprintable? I mean how do we right "alt 255" without using the keyboard? (the problem is the alt key)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can create a character constant for it:
character, parameter :: alt255 = " "
where while typing this line, press ", then hold down ALT while using the numeric keypad to type 255, then another ". This ends up being hex A0. You may be able to use this in a path to give to RENAMEFILEQQ.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I already solved the problem. Thanks for everything. Your really great.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page