Hi all,
When I drag an internet .url shortcut file into a folder, if another .url file with the same name exists, it appends -01 to the file name. How can I turn it off to not allow a duplicate link to be dragged?
To start with in order to be true duplicate, the file content which contains the url must match too. But let's ignore that and just compare the file name regardless of the contents. BTW that is not the behavior when you drag a file from another folder. Only with links .url files which are generated on the fly.
I looked everywhere but could not find a place to suppress that in the configuration.
Please help.
Angel
suppress renaming of duplicate link files
Re: suppress renaming of duplicate link files
I believe this is handled (and caused) by Windows Explorer.
the same happens when dragging or pasting files from an android mtp device.
the same happens when dragging or pasting files from an android mtp device.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
Re: suppress renaming of duplicate link files
No, it is not.
Win Explorer spawns a "Copy File" dialog, and even if you opt to save both files it append an incremented digit in parenthesis.
duplicate file name in Win7 Explorer:
XY automatically appends a 2 digit string. No dialog whether to overwrite or cancel:
I want to suppress the XY auto renaming, so that it will be similar to the Win7 Explorer.
I noticed that this only happens with .url files. I guess Microsoft calls them favorite files. In fact they are just .ini files with a .url extension. They have only one section:
Sometimes they also have an IconFile= entry in the same section, but not always. Anyway, for naming conflict, the file system is not concerned with the file contents, just the file name.
This behavior is very annoying in a scenario where a folder has thousands of such links.
Angel
Win Explorer spawns a "Copy File" dialog, and even if you opt to save both files it append an incremented digit in parenthesis.
duplicate file name in Win7 Explorer:
Code: Select all
C:\dir\filename.url
C:\dir\filename (1).url
C:\dir\filename (#).url
Code: Select all
C:\dir\filename.url
C:\dir\filename-01.url
C:\dir\filename-##.url
I noticed that this only happens with .url files. I guess Microsoft calls them favorite files. In fact they are just .ini files with a .url extension. They have only one section:
Code: Select all
[InternetShortcut]
URL=http://en.wikipedia.org
This behavior is very annoying in a scenario where a folder has thousands of such links.
Angel
-
- Site Admin
- Posts: 60541
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: suppress renaming of duplicate link files
I don't really understand what is so annoying about the current behavior.
FAQ | XY News RSS | XY Twitter
Re: suppress renaming of duplicate link files
I have a whole catalog/db set up. Many external executables and XY scripts add entries inside the file, and tags, labels and comments in XY. There are thousands of such .url files, scattered in several drives in different folders. All of that catalog logic goes haywire by the XY auto-renaming.
To clean up by search for "-01.url", "-02.url" etc. takes time and sometimes erases good data if the auto-renamed file has already been tagged/labeled/commented inadvertently, or the contents have added new key/value entries, which are not visible unless the file is opened for edit.
The problem comes from the fact that it is not copying but creation of a new file. As usual the Win7 Explorer dialog is mistitled "Copy File". There is no copying whatsoever. Firefox & Chrome drag-n-drop create a ".url" file (inside it's an .INI file). IE9+ drag-n-drop creates a ".website" file (still .INI inside, but has more sections). But they are all NEW FILES.
For example I wrote several utilities that create text files I intentionally use different auto-renaming pattern which shows me which utility was used to generate the file...
Thanks for looking into this.
Angel
To clean up by search for "-01.url", "-02.url" etc. takes time and sometimes erases good data if the auto-renamed file has already been tagged/labeled/commented inadvertently, or the contents have added new key/value entries, which are not visible unless the file is opened for edit.
The problem comes from the fact that it is not copying but creation of a new file. As usual the Win7 Explorer dialog is mistitled "Copy File". There is no copying whatsoever. Firefox & Chrome drag-n-drop create a ".url" file (inside it's an .INI file). IE9+ drag-n-drop creates a ".website" file (still .INI inside, but has more sections). But they are all NEW FILES.
The fact that you answered my question with a question makes me believe that there is no fix. Then this post becomes a wish/suggestion. What I'm really looking for is a config of the auto-renaming. The config logic ought to be per file type. For example, for one file type I may want to use a different renaming pattern, different suffix, like Win 7 Explorer " (#).website"; or pack some other characters into the suffix or a date-stamp suffix instead of an auto-incrementing digit; or a prefix instead of suffix for some bulk operation; or turn off auto-renaming for that file type altogether, as for the .url file type.I don't really understand what is so annoying about the current behavior.
For example I wrote several utilities that create text files I intentionally use different auto-renaming pattern which shows me which utility was used to generate the file...
Thanks for looking into this.
Angel
-
- Site Admin
- Posts: 60541
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: suppress renaming of duplicate link files
To me it sounds good and natural that dropping a link to an (newly created) URL file does not overwrite any existing file. I don't think many users would prefer an overwrite. Making it optional or pop a prompt would be a posibility, but low prio at the moment I'm afraid.
FAQ | XY News RSS | XY Twitter
Re: suppress renaming of duplicate link files
For most scenarios, you are right, it's natural. What you pride in is the incredible flexibility of XY.
Can you think of a script that would cause an alert to popup (only for .url files) and prevent the creation of the new file?
Maybe only for a certain folder specified in the script? I can try to drop only in that folder.
Angel
Can you think of a script that would cause an alert to popup (only for .url files) and prevent the creation of the new file?
Maybe only for a certain folder specified in the script? I can try to drop only in that folder.
Angel
-
- Site Admin
- Posts: 60541
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: suppress renaming of duplicate link files
No, a script cannot help here.
FAQ | XY News RSS | XY Twitter