Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 303
  • Last Modified:

DOS directory and Windows Explorer directory do not match

I was testing some batch files using the command prompt.  I used Windows Explorer to rename the files.  However, when I went back to the command prompt and entered "dir", the file names did not update.  They appeared with the previous name even though in Windows Explorer they had definately changed.  Also, I edited some of the batch files by right-clicking on them in Windows Explorer and choosing edit.  I saved the files and then opened them again to make sure the changes were there.  However, when I went back to the the command prompt the files had the old names and content even though they did not in Windows Explorer.  I ended up having to reboot.  Our programmer has also experienced something similiar when she tried to update a program and icon.  The new icon ran the old program, even though the old program had been renamed and removed.  What could be happening?  Is there some kind of cache that can be cleared?
0
tmaususer
Asked:
tmaususer
  • 3
  • 3
  • 2
1 Solution
 
John HurstBusiness Consultant (Owner)Commented:
Try closing the DOS window, re-opening it and trying again to see if the problem persists.

I occassionally see the same file list for a diskette drive after I have changed the diskette. So something gets saved somewhere, even if just in memory.

I also assume your filenames are short enough to be interpreted by DOS.

... Thinkpads_User
0
 
tmaususerAuthor Commented:
yep, they are short file names without spaces.  I tried closing the DOS window and then reopening it.  I had to reboot, but I wonder what caused it and if there is a way to prevent it.  This also affects the programmer at times.
0
 
John HurstBusiness Consultant (Owner)Commented:
It happens very infrequently to me and only in specific circumstances. I will keep looking around for a cause.
... Thinkpads_User
0
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
tmaususerAuthor Commented:
I am having a hard time finding the wording to use to search the topic.  I have tried "command prompt does not update file names" and "DOS directory does not match Windows Explorer", but have not come up with much.  What keywords and phrases do you suggest?
0
 
John HurstBusiness Consultant (Owner)Commented:
As I noted, it happens infrequently to me, and only when using my floppy drive in a Windows 7 machine. Otherwise, I have no issue.

Take a look at this article from Microsoft that does obliquely talk about this.

http://technet.microsoft.com/en-us/library/cc750056.aspx

It is about batch files and not just the DIR command.

You may wish to scan your system for malware. ... Thinkpads_User
0
 
subhashchyCommented:
i think its sort of file system write cache..Where you r writing the data ? On a SATA disk / IDE disk  / USB or somewhere else ?

Actually when a program writes something to filesystem its not instantly flushed to the disk (If write cache enabled).Windows make the program think it written the changes and write the data in cache. If another program tries to access the same data sometime it may not find the accurate copy of data instead use the older version from the disk not from the cache.

If you go to the HDD properties you will see a check box under Polices tab mentioning Write cache..


You can try un checking that box and see if it fixes that issue..
0
 
tmaususerAuthor Commented:
It is a SATA drive.  It doesn't happen very often, so it will be difficult to know if it helps.  Thanks for the good idea.
0
 
subhashchyCommented:
yeah. Agree. DO update with the findings..
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 3
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now