Questions tagged [file-attributes]

Question regarding create/read/update file attributes in code

185 questions
1
vote
0 answers

Overcome MAX_PATH filename length

I have read a lot of documentation on this subject, but I can't seem to figure it out. The cause is that I have to process file paths which may be longer than the MAX_PATH parameter, causing a lot of issues I have already replaced all my…
1
vote
2 answers

iOS: programmatically prevent iCloud backup

How can I programmatically prevent a file in my Documents directory from being backed up to iCloud if the user has enabled that? I assume there are two routes: backed up from the iOS device and backed up from the iTunes backup on the Mac. I see that…
Questioner
  • 21
  • 2
1
vote
0 answers

python zip extract with timestamp under Windows

i'm using python2.7 to extract zip files under windows - created by 7z.exe. Now if i use zip.extractall(), the extracted files have a modfied date, which causes some problems in later prosessing these file. Now, how can i preserve the timestamp of…
Andreas Müller
  • 210
  • 2
  • 10
1
vote
0 answers

How to copy file in haskell to directory with "append only" permission and with preserving modification time

I have destination directory on windows with "append only" permission. I want to copy file to it and I want to preserve modification time. Next code makes copy but than crashes: import qualified Data.ByteString.Lazy as BS withBinaryFile destPath…
1
vote
1 answer

windows subsystem for linux preserve file attributes in git repo

When sharing a git repo between wsl on windows10 and any linux, all files added/changed from wsl get the rw-rw-rw attributes, even if I explicitly do a chmod ug+x file.py before adding. If You do a ls -l in wsl all files are listed with rwxrwxrwx no…
MortenB
  • 2,749
  • 1
  • 31
  • 35
1
vote
1 answer

All files has FILE_ATTRIBUTE_ARCHIVE attribute

I'm working on a program that should retrieve attributes of all files from chosen directory in std::vector. This code shows how I'm getting file attributes: DWORD attr_flags = GetFileAttributes(file_path); if (attr_flags == INVALID_FILE_ATTRIBUTES)…
johnbrovi
  • 82
  • 1
  • 8
1
vote
2 answers

What does @ mean next to the file attributes in unix?

I noticed I have one file that looks like this when I type ls -lah in the terminal: -rw-r--r--@ 1 bj5 1704 2.3M 13 Mar 16:12 All_Metadata.csv I was just curious as to what the @ symbol means? I presumed it's a file attribute but I googled it…
Ben Jeffrey
  • 714
  • 9
  • 18
1
vote
4 answers

Is there any way to set file attributes in node js

Not sure about unix, but in windows you can add attributes to files, like a location on a photo file or a duration on a video file. Is there a way to do this in node js. Would be very handy with my currently project. It would save me having to…
Gordon Truslove
  • 724
  • 2
  • 10
  • 19
1
vote
1 answer

Use swift and macOS to set file attributes

macOS, swift3 Apple has an API Foundation > FileManager > setAttributes(_:ofItemAtPath:) The declaration is func setAttributes(_ attributes: [FileAttributeKey : Any], ofItemAtPath path: String) throws It is for setting the creation date etc for a…
jon
  • 121
  • 5
1
vote
2 answers

Is there any way to access http://:/logs.log.txt using Java code in windows

I am trying to get file attributes present in a Unix server and when I type this url in my IE it displays the files in the file-folder-directory architecture. I am planning to write a code for a tool such that I can automate the process of getting…
ManiVI
  • 556
  • 1
  • 5
  • 18
1
vote
1 answer

How do you change file permissions in Java using NIO library on Windows 7

I'm trying to write code that starts with a Path object that is for a specific file and makes it so the owner of the file no longer has permissions to move it, delete it, or modify it, but they can still read it. Also need to make sure that this can…
JereTheJuggler
  • 127
  • 1
  • 2
  • 9
1
vote
1 answer

attribute in IE 11 is not showing correctly

In IE 11 when you do below coding in HTML Issue :Browse button and textbox are not aligned properly, there is no space between browse button and textbox. Is there any way to add space between these two, ie. textbox space…
user3934778
1
vote
2 answers

How to read length of video file from cmd

I have a bunch of mp4 files in a folder and I want to create a text file with all the names and the length of the files as in: 01_Welcome.mp4 00.01.23 02_Tools.mp4 00.03.12 I know how to read the names of the files buy how do I get the length…
Ivan Yosifov
  • 59
  • 1
  • 6
1
vote
3 answers

Finding the attributes of Chinese filenames using NewLISP?

The following NewLISP code shows me the file attributes of files under Win32. However, some of the filenames retrieved have Chinese characters in the name. When the GetFileAttributesA function encounters them, it gives me a -1 for the attribute. I…
bugmagnet
  • 7,631
  • 8
  • 69
  • 131
1
vote
1 answer

write protection mode will not change

I use this following code to remove the write protection folder so that I can delete that. But It won't work. File.SetAttributes(@"F:\File", FileAttributes.Normal); File.Delete(@"F:\File"); How can I remove the write protection? If I can remove…
Ali Vojdanian
  • 2,067
  • 2
  • 31
  • 47