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

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

Related

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

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?

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.

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 7 Symbolic Link - Cannot create a file when that file already exists

I'm trying to create a symbolic link between two directories. I have a directory called TestDocs and TestDocs2. I will be doing all my work in TestDocs, but I need it all to be reflected in TestDocs2. So all files that are in TestDocs2 will be replicated in TestDocs, and if I add a file, change a file, etc in TestDocs it should be reflected in TestDocs2.
So I thought it would be as simple as just doing this:
mklink /D TestDocs TestDocs2
But when I do that I get the error:
Cannot create a file when that file already exists
Why am I getting this?
Also, do I have the order of my TestDocs and TestDocs2 wrong in the command?
Thanks for the help, Symbolic Links have always confused me!
The correct usage is:
MKLINK [options] {link} {target}
You're creating a link, so the link is the new link you're about to create.
And the target is the link's target, which is the existing directory.
Here is how that worked for me.
I wanted to relocate my C:\ProgramData\Package Cache to F: partition.
Steps I had to do:
Physically move "C:\ProgramData\Package Cache" to F:. Now I had "F:\ProgramData\Package Cache" and "C:\ProgramData\Package Cache" is gone since I moved it.
In cmd run (all in one line, split here for readability)
mklink /J "C:\ProgramData\Package Cache"
"F:\ProgramData\Package Cache"
Result:
Junction created for C:\ProgramData\Package Cache <<===>>
F:\ProgramData\Package Cache`
I did this for Google Picasa so I could access photographs on more than one machine. It works very well as Picasa is not really a netowrk enabled program.
For me I did the following:
Install Picasa
Run the application. This will create all the necessary database files.
Close the application.
Navigate to the directory where the database is - on Windows 7 it will be created in c:\users\\AppData\Local\Google
There will be two folders Picasa2 and Picasa2Albums
Copy these folders to a network location. In my case I created a folder called o:\PicasaDatabase and copyied these folders into it.
Next rename the original folders to Picasa2.old and Picasa2Albums.old
Run the following commands from an elevated cmd prompt:
mklink /D "c:\Users\\AppData\Local\Google\Picasa2" "o:\PicasaDatabase\Picasa2"
mklink /D "c:\Users\\AppData\Local\Google\Picasa2Albums" "o:\PicasaDatabase\Picasa2Albums"
Two symbolic links will have been created in the source location and they will point to the network drive.
Obviously using symbolic links like this is a workaround for application that are not networkable and only one user can access the database at once.
I had the same issue. You have to make sure the Source folder does not already exist. (if it does , then rename it to something else)
In case of below Backup folder should not exist under MobileSync. Since Apple iTunes looks for Backup folder with that name, just rename the existing folder to something like OriginalBackup to avoid iTunes from finding it. Instead the mklink will synonym Backup to D: folder as below
mklink /J C:\Users\Dell\Apple\MobileSync\Backup D:\Apple\Backup\iPhoneXRBackup
I had this error. Two things I did to fix it.
check I was actually in the directory I thought I was and not another one with a very similar path.
put quotes around the new link name.
First attempt:
mklink /d \shared_files ....\my-app-public\src\shared_files
gave error described.
Second attempt:
mklink /d “.\shared_files” ....\my-app-public\src\shared_files
worked fine.

Windows cmd: Copy over entire directory *including* parent directory. Solution without specifying same parent directory name

In Windows, how do you copy an entire directory, INCLUDING the parent directory folder?
For instance, let's say we have the directory c:\Folder and want to copy it over to d: .
The only way right now would be:
xcopy /E c:\Folder d:\Folder
Is there a way to do this without specifying the same end directory (Folder)?
I'm told that an application called RoboCopy can do it, however, I believe it's part of a series of server 2003/2008 tools -- I can't speak to its capabilities or whether it will work on your version of Windows. That said, there are a set of tools (basically UNIX commands ported to DOS) located here that will do what you need -- specifically the "cp" command. My apologies for not being able to assist further.

Resources