Only FileSnoop can see my Win10 NTFS data file. Why? - window

On a Win10 laptop, I have an application that writes data files to the C: root directory (DL900WIN, which is a home alarm security GUI). The PC Magazine utility FileSnoop v1.1.0.0 can see it and confirms the name, size, file/date and attribute "A". The filenames is "201207backup-DL900.DL1"
The Win10 File Explorer cannot see this file, even with "Hidden items" checked.
The Win10 CL dir does not show this file, with or without the /ah option.
The Win10 WSLinux does not show this file, even with the -a option.
If DL900WIN writes the file to a folder instead of C: root directory, then it is visible as a normal file should be. I can operate this way, but now I cannot delete the files in the C: root directory, so I'd like to learn.
What file system mechanism exists to hide a file in the root directory so that only FileSnoop (and DL900WIN) can see it? How can I access such a file with normal OS tools?

Related

Accessing the Windows Recycle Bin in WSL2

In WSL2, is it possible to access the Windows Recycling Bin? Say for example you move file.txt into the recycling bin in the Windows GUI, could you move to the directory that file.txt is contained in on the WSL terminal? How could this be done?
Officially, no. A special implementation of IShellFolder in shell32 handles the recycle bin when files are moved/deleted in the shell namespace.
Unofficially, each drive contains a hidden $Recycle.Bin folder (Recycler before Vista). Each user has a directory inside there named after their SID where their deleted files are stored.
The deleted files do not retain their original filenames, only their extension. Before Vista, a file named INFO2 stored this information. These days $I... stores the information for the original files renamed to $R...
Look at forensics tools like Rifiuti2 if you need to understand the internal format so you can extract the original name...

Unable to find files in Documents from cmd

I am using Windows 10 and when I save a document I see the Documents folder it is being saved to on the left of the screen in the list under 'thisPC'. The bottom of that list has the C: drive. From Powershell, Bash or command prompt when I try to cd or locate the file I just saved I am told that it cannot find such a file. Why is my home directory the C: and not include the other files I mainly work with? I appreciate any help. Thank you
Command prompt works with files and folders.
Explorer works with virtual files or folders. Explorer is for users to easily find their stuff.
In Command prompt there is no such thing as This PC or anything under it. These are virtual things.
dir "%userprofile%\documents"
will list the files in your Documents folder if it is in the default location.

Viewing and copying document on a laptop onto a usb only using command prompt

I am trying to download a file onto a usb from my laptop which is suffering from software issues. I used the command C:users\username>\dir documents on another pc, and was able to view the documents in the folder however, on the laptop in question, the command did not work and I was given the message "The system cannot find the path specified." I am trying to find the name of the document I need to copy so I am requesting a command which enables me to view all documents in the folder. After I find the name of the document, I am also unaware of how I can use command prompt to copy the file onto the USB i have inserted.
I am accessing the command prompt through System Recovery. I do not know code in any form. IMPORTANT Information which may be the reason for the lack of ability to do anything. When I type prompt>dir ****.docx /s /p, I get the message Volume in drive C has no label rather than Windows 7.
This could help-
http://www.dummies.com/computers/operating-systems/windows-xp-vista/how-to-search-for-files-from-the-dos-command-prompt/
As for copying files in cmd, it's as easy as-
prompt>copy <source> <destination>
For changing the drive (to the USB drive), use the "/d" option-
prompt>cd /d <USB drive name>
To view all the contents of current directory, use "dir"-
prompt>dir
Basically, you're not using right syntax. Kindly make cd c:\users and than write dir like this C:> cd C:/Users than your directory will be changed after that you can see C:/Users. So you can write dir in order to see your directories

I can't see pasted files in bash for windows

I'm working a programming project from school and decided to give Bash for windows a try. I downloaded the skeleton files for the project and pasted them inside the folder where my bash home folder should be. When I open the terminal and go inside the folder it shows as if there was nothing there even though I'm at the right folder. How can I get the files to be displayed?
EDIT: By now, there is actually a supported way to access these files. You have to use the \\wsl$\Legacy "network" share. For example, you could access your WSL home folder in Windows using \\wsl$\Legacy\home\<username>. Still, you should not directly access the lxss directory.
You are not supposed to touch the LXSS folder ever. The files there are use special attributes which are not understood by normal Windows applications to provide the features of a full Linux file system which NTFS on its own can't provide.
There is one hard-and-fast rule when it comes to Bash on Windows:
DO NOT, under ANY circumstances, create and/or modify Linux files
using Windows apps, tools, scripts, consoles, etc. Creating/changing
Linux files from Windows will likely result in data corruption and/or
damage your Linux environment requiring you to uninstall & reinstall
your distro! Note: Your “Linux files” are any of the files and folders
under %localappdata%\lxss – which is where the Linux filesystem –
distro and your own files – are stored on your drive
If you want to copy a file into a WSL directory which is not under /mnt, then use WSL to copy the file, i.e. use cp /mnt/c/original/folder/of/the/file.txt ~/ for example.
A more advanced alternative is starting a local SSH server in WSL and using Win-SSHFS to mount the WSL root as a drive in Windows. This way, file access will go through WSL.
Its unclear what you're asking in your question. What did you paste? Whole files? Text? Where did you paste it? Did you do the pasting into the bash window? If so was it inside a text file or did you just paste to the prompt? I'm going to assume that you pasted files to the directory that you believe that your bash home opens in i.e ~/. You may not be pasting the files into the correct directory because the default directory for bash on windows is not where you would assume it to be. you should be able to reach your desktop by typing cd /mnt/c/Users/yourUserNameHere/Desktop

Windows incorrectly copying files by filename when in a Special Folder

If I copy a file from a special folder to the clipboard, change the location that special folder points to, and try to paste the file to this new location, Windows complains with a Item Not Found error, seemingly trying to copy the file by the filename alone.
The way I change the special folder location is with this line of C++ code:
SHSetKnownFolderPath(FOLDERID_Desktop, 0, NULL, new_location);
And a refresh to see the effect immediately:
SHChangeNotify(0x8000000, 0x1000, NULL, NULL);
Steps to reproduce
Desktop pointing to C:\Users\BoppreH\Desktop
Copy the file music 1.mp3 from the Desktop (C:\Users\BoppreH\Desktop\music 1.mp3)
Change location of the Desktop special folder to D:\music
The Desktop now shows the musics from D:\music
Try to paste music 1.mp3 on the Desktop
It fails with Item Not Found, complaining it could not find the file at D:\music\music 1.mp3, when the file is still happily sitting at C:\Users\BoppreH\Desktop\music 1.mp3. If I paste the file in any other folder that is not the Desktop, it works fine.
I know this is a case of Doctor, it hurts when I do this, and that constantly changing the location of the Desktop is extremely unusual behavior, but this is a feature I've grown to love and this bug constantly bites me.
Is there some workaround for this issue?
Use some type of folder watcher control to detect when the Special Folders location has changed and check the clipboard for any file paths that refer to the old location and update them.
Or change the location of the Specials before you copy the file.

Resources