Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I've found 2 hidden files on my drive D:/ , I found them by accident, because one day I opened a picture (1 picture exactly on my drive D:/), and by accident I push right navigation button on keyboard, and there is another picture WHICH familiar with me, and there is another, okay maybe this is not important but this is the name (1. AlbumArtSmall.jpg, 2. Folder.jpg), okay I think these 2 jpg files is hidden, but when I unhidden by the step : Tools > Folder Options > View > Show hidden files and folders, but It doesn't make sense (there is no such file on D:/), after that I check it again by command prompt, which is the step :
1. %drive% d:
2. D:> dir
3. there is no such file (those 2 jpg file)
But, when I check with cygwin terminal as I know this is for Linux OS (my OS is windows7 by the way :
1. /cygdrive/d
2. $ dir
3. there is such file (those 2 jpg file)
I know this is not a big problem, but I'm curious why this is happened? And if I want to delete these 2 files, I can do nothing, maybe there is a way to delete them by cygwin terminal command, but the problem for me not because I want to delete them, but more for why this is occur?
Thanks in advance, sorry for my English.
They are probably hidden and system. You can display them in explorer by selecting, in addition to "show hidden files", the "show system files" option.
On the command line, dir /a will show you hidden and system files, too. To delete them from the command line, type attrib -h -s -r *.jpg to remove hidden, system, and readonly attributes from all jpg files (for example). Then just normal del file.jpg.
Cygwin does not recognize windows-like hidden files (thus showing you them), because in Linux hidden files are marked with a leading point. If you use a windows shell on "unix-"hidden files, you will see them, too, but cygwin should not.
For deletion: Afaik you can make them visible and then simply delete them.
Command prompt won't show hidden files if you execute dir. If you want to see these hidden files, then use dir /a.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I have opened a file through on Windows command prompt, just by navigating to that directory and then typing it's name. Now is there a way to close that (open) file through the command prompt? I've been searching around and I can't find out how. Seems to be a pretty simple command to not exist.
There is no MS-DOS in Windows and has not been since about 2003. The "Command Prompt" program (named cmd.exe) runs in a console window and looks and behaves like the command interpreter of MS-DOS, enough like it to seem the same to many people, although there are some small differences.
If you give a filename as a command to a command prompt and that named file is not a program, it looks at the extension to try to select an appropriate program to run and open the file. The .doc extension usually corresponds to MS Word (Office) or the stripped-down version MS Works, but depending on what software you have installed and how it is configured .doc could be something else. You can find out what it is on your system by the command-prompt commands assoc .doc and usually then ftype (value from assoc) or by looking in the registry under HKEY_CLASSES_ROOT. Once the program runs (a running program is also called a process) it may keep the file open while running (like Word) or only open it briefly and then close it (like notepad).
Once you know what program/process is running, you can direct that process to stop with the taskkill command. Type taskkill /? for help information. If there is more than one process running the same program and you use the /im option, it will stop all of them, not just the one you want. To use the /pid option, tasklist or TaskManager can help you find the right process -- but if you use TaskManager it can also stop the process, so taskkill is unnecessary. If the program malfunctions and doesn't stop when directed, taskkill /f will force it, but this may leave the open file(s) with damaged and incorrect or unusable data.
Also note that command itself effectively keeps the directory open. If you are trying to rename or move a subtree of files including that directory, you must first either cd the command process somewhere else, or terminate it with exit.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I'm using the robocopy command
robocopy empty_dir super_subfoldered_folder /s /mir
rmdir empty_dir
rmdir super_subfoldered_folder
to delete the folders at once but during this command robocopy.exe stops working.
I have tried to delete from a path that starts at least 50 sub folders inside the main folder still crashes.
I've tried renaming them to "1" but windows doesn't let me past 100+ folders and there are at least 1000 more. Tried to create new partition- subst j: . rename some folders and delete the partition but this takes forever because of their number.
Tried dir /x and del the shortened name -> doesnt work.
Is there another way to delete those folders ?
File path in Windows goes through several layers before it gets to the actual file system driver. As a result there are two limits. 1) MAX_PATH (260) limitation introduced by the top-level API 2) 32K actually used by the file system. Since you already have that path, it is obviously within the limits of the file system. Try using path by adding "\\?\" to the front. This is an indicator that Win32 API should not parse the string but pass it directly to the file system (http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx). This will only work if the proces making the call is Unicode and 64-bit (on a 64-bit system). Otherwise the string must be converted and/or marshaled and you are back to the 260 limit.
Windows has a subdirectory depth limit and it's not very deep.
You may get a better result by booting up a Live Linux distro on cd or USB, like Ubuntu, and using the GUI file manager to delete the tree.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
After using this command
root#localhost:/var/www/google# mv /* ./
mv /* ./
mv: cannot move ?dev?to ?/dev? Device or resource busy
mv: cannot move ?proc?to ?/proc? Device or resource busy
mv: cannot move ?run?to ?/run? Device or resource busy
mv: cannot move ?sys?to ?/sys? Device or resource busy
mv: cannot move ?var?to a subdirectory of itself, ?/var?
Every command is going wrong.
After that, I want to zip my files as backup and it gets wrong.
Somebody help me, thank you .
I want to restore the system normally.
If that not, how to zip it with some zip tools?
Judging from the comments, you were running as root and the current directory was /var/www/google when you ran the command:
mv /* ./
This has moved everything movable from / to /var/www/google. One side effect is that the commands that normally live in /bin are now in /var/www/google/bin and those that live in /usr/bin are now in /var/www/google/usr/bin.
Do not reboot. Do not log out.
If you do, you will have to reinstall from scratch.
Temporarily, you can do:
PATH=/var/www/google/bin:/var/www/google/usr/bin:$PATH
cd /var/www/google
mv * /
These steps undo the primary damage (you should be able to reboot after this, but don't).
You then need to replace the directories that are now in / but that should be in /var/www/google back in the correct place.
You should create a new terminal session and check that your system is working sanely (do not close the open terminal until you've demonstrated that all is OK again).
Don't work as root unless you have to, and only for the minimum time necessary (one command at a time?).
If any of this fails, you should probably assume that a reinstall will be necessary. Or take the machine to someone who has the experience to help you fix the problems. There are endless things that could go wrong. Mercifully for you, the /dev directory was not moved; that avoids a lot of problems. However, the /etc directory was moved; commands could get upset about that.
try to revert it
cd /var/www/google
mv ./* /
Good Luck
PD to zip:
zip archive.zip /path/to/zip/*
EDIT
/var/www/google/bin/mv /var/www/google/* /
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
This looks like a common question. But I was not able to find answer for it. When we try to install windows programs, what exactly happens? What files are copied where? What is written in the registry?
Most programs come with an installation program named Setup.exe or Install.exe. When you install a program, the installation program usually does the following:
Looks for a previous version of the program on your hard disk. If it
finds a previous version, the program may ask whether you want to
replace the previous version.
Creates a folder in which to store the program files. Most
installation programs ask where you'd like this folder. Some
installation programs also create additional folders within this
folder. Windows creates a folder named Program Files, usually in C:\
(if Windows is stored in a partition or drive other than C, the
Program Files folder is usually in the same partition). We recommend
you install all your programs in folders within the Program Files
folder.
note Some software vendors have the bad habit of installing
application programs in locations other than your Program Files
folder. You can't do much about this; the additional folders may
clutter up your root folder, but they don't do any harm.
Copies the files onto your hard disk. If the program files are
compressed, the installation program uncompresses them. Usually, the
installation program copies most of the files into the program's
folder, but it may also put some files into your C:\Windows,
C:\Windows\System, or other folders.
Checks your system for the files and hardware it needs to run. For
example, an Internet connection program might check for a modem.
Adds entries to the Windows Registry to tell Windows which types of
files the program works with, which files the program is stored in,
and other information about the program.
Adds a command for the program to your Start | All Programs menu
(some programs add submenus to the Start | All Programs menu to
contain several commands). The installation program may also add a
shortcut to your Windows desktop to make running the program easy for
you. You can change the position on the Start menu of the command for
the program, get rid of the command, or create a command if the
installation program doesn't make one. You can also create a shortcut
icon on the desktop, if the installation program hasn't done so, or
move or delete the program's shortcut.
Asks you a series of questions to configure the program for your
system. The program may ask you to type additional information, like
Internet addresses, passwords, or software license numbers. It may
also ask which users should be able to run the program.
Every installation program is different, because it comes with the application program, not with Windows. If your computer is connected to a LAN or to the Internet, the installation program may configure your program to connect to other computers on the network.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Is there a way to unlock Windows files without downloading a utility?
I have a few files on my Windows XP C: drive that are very old and very useless. When I try to delete these files I get the following message:
Cannot delete FILENAME.zip: It is being used by another person or program
Close any programs that might be using the file and try again.
No one is accessing this file. No program is using it currently. Windows has screwed up the file locking mechanism.
Is there a way to delete this file without downloading someone's unlocking utility? I find the sites offering these programs to be a tad sketchy.
How could you force the file to unlock from within a program? I'm competent in Java, Perl, and Ruby, but I haven't seen anything among their libraries that would aid me here.
I've successfully used Process Explorer to find out which process has the file open. It saves a reboot that may not fix the problem anyway.
In process explorer: Find > Handle or DLL... then search for the name of the folder/file, then double click one of the search results. It'll select a handle in the main window, which you can right click and close.
Try downloading "Unlocker". Google it and take my words that it doesn't have any worm/spyware/virus. It is pretty cool utility and works great. Give it a try.
Did you try the commandline command OpenFiles
It is built in (XP and above I believe) and has several arguments that can be passed in.
Use msconfig and start up with everything turned off.
Then try to move / delete the file.
Or you can always boot up in safe mode and delete it.
You do that by hitting f8 when the machine boots up.
If you reboot and the files are still locked, then there is some process on your machine that is still using them. First you should figure out what that process is and determine if the files really aren't used any more or not.
Rebooting to Safe Mode is often a very easy way to do it. When you boot in safe mode, it won't load all the stuff set to run on startup. Press F8 while it's booting to access the boot menu, and choose "safe mode".
I had a .jpg pfile that hasd that issue and I couldn't delete. That brought me to this thread. When nothing else worked I renamed the file and left off the .jpg. THEN I could delete it easily. Not sure why, but worked for me
You don't need any utility.
Just use Win32 api to unlock them (simply close the handle)