Re: del command and auto-named file disaster





"Deniz" <deniz.turkmen@xxxxxxxxx> wrote in message
news:f00e3721-1378-427a-8878-adcba865d67d@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
OK maybe I should have known better, but I still believe this should
be avoidable in OS/FS level.

As you know Windows file system names the copy of a file as "Copy of
FILENAME" by default. When I need to update an important file, I
simply create a copy and work on the original. If anything goes bad, I
still have the original file "Copy of FILENAME". If everything works,
I don't need the duplicate so I delete the copy. This works perfectly
until I delete the file in command line without quotes!

dir
FILENAME
Copy of FILENAME

del Copy of FILENAME

Can you guess which file has been deleted? Hint: Delete command looked
for 3 files, not one. (hand-palm)

Lesson learned in a hard way. To avoid future disasters, is there
anything I can do e.g. a Windows tweak that allows Delete command to
send the file to Recycle Bin instead of wiping completely? Or making
Delete prompt me by default? Or even more hardcore, changing the
default auto-naming convention?

Thanks in advance.

Windows Explorer has a GUI. It is designed for users and has the safety net
of the Recycle Bin.

The console is for administrators, not for users. It has no safety net. When
you delete a file then it gets well and truly deleted. If you need a safety
net then you must use Windows Explorer.


.



Relevant Pages

  • Re: Quando Apple lascia le cose al caso...
    ... " keep a backup file ... " make all windows the same size when adding/removing windows ... " remove '=' from the list of valid filename chars. ...
    (it.comp.macintosh)
  • Re: How to pass short filename in context menu?
    ... So in the command field in the registry change the path to cmd to something explorer can't find. ... Windows 95/98/Me: The Windows system directory. ... > would pass the long filename in a context menu shell command. ...
    (microsoft.public.windowsxp.general)
  • Re: running non-python progs from python
    ... > that indicates that Windows cannot find the command, ... > that, so to make sure Windows finds the command, you have to add it to ... > (if the filename may contain spaces, you may have to add quotes around ... I DID NOT ASK ANYONE TO READ MY MIND, NOR DID I COMPLAIN THAT ANYONE COULD ...
    (comp.lang.python)
  • Re: More blanks in filenames
    ... I do know windows ... character of the filename in the above 'set' command appears as ... I don't think you have a tab in the filename. ...
    (comp.lang.tcl)
  • Re: running non-python progs from python
    ... > Fredrik, the example you provided is virtually the same as the one from the ... os.systemexecutes the command just as if you've typed ... Windows doesn't look at the Python path when you do ... (if the filename may contain spaces, you may have to add quotes around ...
    (comp.lang.python)

Loading