Question regarding create/read/update file attributes in code
Questions tagged [file-attributes]
185 questions
2
votes
1 answer
Difference between modification_time and change_time in fs::file_info()
The R package fs provides the function file_info() which returns a tibble containing i.a. the variables:
modification_time The time of last data modification, as a POSIXct datetime.
access_time The time of last access - as a POSIXct…

Salim B
- 2,409
- 21
- 32
2
votes
1 answer
Apply Folder Icon Change
I am attempting to change the icon of a folder. The code below does all what I found online says to do but the icon never changes. Am I maybe not "Applying" the change?
string createdFile = Path.Combine(@"C:\Users\np\Desktop\PUTEST",…
user4410592
2
votes
2 answers
How to know whether a file was processed before
How can I be sure if a file was processed before? There is a remote storage location which is a file source for my application. My program gets files from this location and processes them in a scheduled way. How can I be sure that the next time I…

ayengin
- 1,606
- 1
- 22
- 47
2
votes
3 answers
Java I/O: Setting time stamp
I'm reading Oracle documentation and encountered something that looks like an error to me.
Perhaps someone can confirm, or explain it better than the…

Markus Fransson
- 23
- 3
2
votes
0 answers
Set Created date on a PHP download
I have a PHP function for letting a user download files. (There are a few custom functions in the code, maybe_redirect, validate_document, headers_no_cache, etc., but you get the idea from the names, and what they do precisely isn't germane to the…

Stephen R
- 3,512
- 1
- 28
- 45
2
votes
2 answers
Windows Command Line - Changing a file modified timestamp to an earlier datetime
in windows command line i can use the following to change the timestamp of a file to the current datetime:
copy /b filename.ext +,,
what i need is a way to set the timestamp to a previous datetime (-1 day, -1 week etc)
is this possible?
What i…

Dan Hall
- 1,474
- 2
- 18
- 43
2
votes
1 answer
setting the create date of a file
I have a folder full of mp3 files. They are named consecutively 01.mp3 through 86.mp3. They currently all have the same create_date. I need them to all have different create_dates, preferably a day apart. What the create date is doesn't really…

Jeff
- 423
- 1
- 5
- 14
2
votes
0 answers
Check file creation time in jenkins pipeline
I'm wondering if anybody knows a generic way in Jenkins pipeline to find out the creation time of a file? There are operations to touch a file but seemingly not for reading that time.
What I actually want to do is to clean out workspaces every few…

johnfo
- 1,676
- 2
- 17
- 28
2
votes
0 answers
Fetch File Attribute of windows shared data using smb file path in java
I was working on the logic to ignore the file's which is created by "Microsoft" which crawling the C:\ drive as shared using CIFS ("smb://hostname:445/sharedfoldername").
I was using the suggested solution by my previous post link (Solution was to…

Tej Kiran
- 2,218
- 5
- 21
- 42
2
votes
0 answers
Is there any way to know that FileSystemInfo.Refresh failed?
It seems that FileSystemInfo.Refresh requires specific rights on the file even though I can't find anything about it in the documentation. I suspect it requires write access to properly work.
Is there a way to check whether a call to that method…

Max
- 3,453
- 3
- 32
- 50
2
votes
1 answer
How to set a file to write-only or read-only in Msys or Cygwin?
The function chmod is implemented in Cygwin but does not fully match access rights in Windows. This appears in the following change log: https://cygwin.com/cygwin-ug-net/ov-new1.7.html
Since 1.7.34, chmod does not always affect the POSIX permission…

Jean-Francois T.
- 11,549
- 7
- 68
- 107
2
votes
2 answers
Can a batch file change the system date; save file with attributes; change date back to current date?
Can a batch file change the system date; save file with attributes; change date back to current date?
Goal to save MYFILE.TXT with the date of 01-01-2010
using Batch commands.
I have tried to set date=01-01-2010
and then save the file, but it didn't…

Edoctoor
- 183
- 1
- 3
- 11
2
votes
1 answer
Firefox add-ons: 1) Linking Python script to add-on main code | 2) win32 api in JPM / NPM | 3) set file attributes in Windows with OS.file
I would like to use the win32 API to create an hidden file on Windows OS.
It seems impossible using JS / Node.js.
With Python, importing the API, it is possible (using SetFileAttributes routine and FILE_ATTRIBUTE_HIDDEN parameter).
So how can I link…

Bento
- 223
- 1
- 12
2
votes
2 answers
delete files which are more than one month old using c#
how to delete files which are more than one month old using c# script.
i am using framework 2.0..

SAK
- 3,780
- 7
- 27
- 38
2
votes
2 answers
xattr/extended attributes not settable for file in /tmp while in $home on same mount works fine
I am playing with extended file attributes under Linux/Fedora and I am currently stumbling a bit since I cannot add/change attributes for files in /tmp while in my home it is working fine - while both paths are on the same mount point, i.e.,…

THX
- 553
- 2
- 8
- 18