Topic "How to prevent changing of modification timestamp"

Author Message
wyo
[View user's profile]

Joined: 2007-04-16
Posts: 4
I'm using WinSCP to copy files to my webserver directories (unix server). Yet I've added a new folder and files into a folder. This containing folder changes then its modification timestamp but I though that's not the way how Unix handles timestamps on folders. Is this a problem of WinSCP?

Since Unix seems to have no fixed creation timestamp is there a workaround to keep or restore the timestamp? Somehow to achieve a fixed creation timestamp?

O. Wyss
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24995
Location: Prague, Czechia
When does the timestamp change? Do you mean creation or modification timestamp?
_________________
Martin Prikryl
wyo
[View user's profile]

Joined: 2007-04-16
Posts: 4
prikryl wrote:
When does the timestamp change? Do you mean creation or modification timestamp?


Modification timestamp. When I add a new folder, the containing folder gets a new modification timestamp.

O. Wyss
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24995
Location: Prague, Czechia
I did few tests and obviously at least on linux, the modification timestamp of directory behaves as you describe. When new subfolder is created, timestamp of parent directory is updated to current time.
_________________
Martin Prikryl
wyo
[View user's profile]

Joined: 2007-04-16
Posts: 4
prikryl wrote:
I did few tests ...


I can be mistaken but I think the containing folder should not change. Anyway is there a command to set the timestamp to a specified value?

O. Wyss
o_o
[View user's profile]

Joined: 2007-03-29
Posts: 10
Location: Germany
wyo wrote:

I can be mistaken but I think the containing folder should not change. Anyway is there a command to set the timestamp to a specified value?

O. Wyss


If you want to change the timestamp on Linux, consider using the touch command. For e.g.

# touch myfile.txt

changes the timestamp of myfile.txt to the current time. For more information either do a man for touch, or look at the [url="https://en.wikipedia.org/wiki/Touch_(Unix)"]Wikipedia Article[/url] at the bottom of which some examples are given.
wyo
[View user's profile]

Joined: 2007-04-16
Posts: 4
o_o wrote:
wyo wrote:

I can be mistaken but I think the containing folder should not change. Anyway is there a command to set the timestamp to a specified value?

O. Wyss


If you want to change the timestamp on Linux, consider using the touch command. For e.g.



Sorry I asked to know if WinSCP could change the timestamp anyhow. Else it might be a nice enhancement.

O. Wyss
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24995
Location: Prague, Czechia
wyo wrote:
Sorry I asked to know if WinSCP could change the timestamp anyhow. Else it might be a nice enhancement.

WinSCP does not support that. Neither I consider it useful for large enough audience. Sorry Sad
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License