Same names files downloads from Linux OS to Windows OS

Advertisement

Guest

Same names files downloads from Linux OS to Windows OS

I have the current scenario and need some help:

Trying to download files from Linux OS to Windows OS, these files have exactly same names on Linux

Folder but when copying them files to a Windows based OS Folder the files with the same name can not be

Copied on to the Windows Folder unless files are renamed.

I have to manually rename these files so I can copy them on to the windows folder. The number of files

with the same name are growing and doing this as a manual process is painful

Sample as follows

"On Linux Server OS"

There is a folder called \var\vpn
Sample of 2 files on the folder with same name are:

name.xml
NAME.xml

Note the same name but case sensitive

Linux Supports having files with the same on the same folder as long as the files are typed differently

lower case / upper case

Any hints to come up with a script that allows WinSCP to get these files downloaded on to Windows based File System Folders ??

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

Re: Same names files downloads from Linux OS to Windows OS

How would you want WinSCP to actually deal with it?
_________________
Martin Prikryl

Reply with quote

manuelbrozo
Joined:
Posts:
2
Location:
Aust

Trying to get WinSCP to rename similar files or add at least two characters to the begining of the file as an example

Files with the same name WinSCP to download them and rename the file downloaded by adding an "x-" to the beginning of each file

Lets say if Name.xml and nAme.xml are found download both files but rename nAme.xml to x-nAme.xml or get nAme.xml to be saved on to a separate Folder on the Windows File System

This is what I am currently doing but manually..

Reply with quote E-mail

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

OK, WinSCP could do this, if both files are part of the same download batch. Is this your case? If you already have name.xml in local directory and you are downloading Name.xml, WinSCP cannot know, if those files are the same or different.
_________________
Martin Prikryl

Reply with quote

manuelbrozo
Joined:
Posts:
2
Location:
Aust

Yes both files are part of the same download batch and the destination File System will be empty, no files at all.. Sounds like you know a lot about the scripting of this application

Reply with quote E-mail

Guest

Any chance if you can tell me what command to use on the script or a script to achieve this ??

Thanks a lot in advance !!

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

There's no way to achieve this. I was just asking to understand your problem, so I can think of possible implementation to solve it. Of course when I find that more people would benefit from it.
_________________
Martin Prikryl

Reply with quote

ChuckNewman
Joined:
Posts:
2

Have WinSCP create files with original names

According to Microsoft https://support.microsoft.com/en-us/help/100625/filenames-are-case-sensitive-on-ntfs-volumes, NTFS *does* support unique filenames that differ only in case. Read the KB for details.

Some of the files on the *N*X I use fall in this category. It would be nice (for me, at least) if WinSCP would copy them onto an NTFS file system as-is without me having to rename files with case-name conflicts.

In my case I'm just using Windows as a back-up repository; I'll only actually *USE* the files after copying them back to a Linux system (if needed).

Reply with quote

Advertisement

You can post new topics in this forum