i can't delete this been trying to delete, force delete using cmd, rename, change location, anyone had any solution on this?
Related
I am using teracopy to move some files. I would like to make a form in visual * .exe where you simply have two windows: one with the file's origin on the right, and another with the file's destination.
I need to copy the file without its extension, verify that the transfer occurred without issue, and then restore the original extension. For example:
Copy file.mov to // smb: Storage / Movies /
Remove the .mov extension
Copy the file to the storage location
Validate file size
If the file size at the destination matches the source, restore the .mov extension
If the file size doesn't match, delete the destination file and notify the user of the error.
The files I plan to copy are very large, and will take a good amount of time. I'm removing the extension so that users on the server will not accidentally try to access a file that isn't completely transferred yet - the idea is they see an "extensionless" file and know not to try and open it, whereas any files with extensions are certain to have copied over correctly.
I've tried using CMD and powershell, but I've only managed to copy the file or retry copying if the copy fails. I don't yet know how to remove the extension and restore it.
> ROBOCOPY /Mir <Source> <Target>
You can try this:
copy %UserProfile%\YourFile.* "Path to copy to"
Basically, I have changed few files in Intellij IDEA and it is
connected to some version control.
I do not want to commit it to version control, but my objective is
to keep a copy of these files somewhere in my filesystem.
By doing this,
I can experiment with the unchanged files in the meantime.
When I want to restore the changes, I can import these changed files.
A brute force way of doing this is to iterate through list of changed files and
make a copy somewhere. Is there any other efficient way?
Since IntelliJ IDEA 2017 you can create patches from entire changelists, save to file and then apply from file.
Local Changes tab -> right click changelist -> Copy as Patch to Clipboard
Paste to .txt file and save.
VCS tab -> Apply patch -> select file
Just got a 488mb .sql file and i need to view the contents of it, whats the way to go about it? i've tried opening it in a few GUI programs, either they don't see the file, one of the programs asked for an encryption key although none of the others did. Im not the most savvy with SQL so a point in the right direction or a easy way to view it would be greatly appreciated.
a proper .sql file is just text, so any text editor will work.
If its just an .sql file, simply right click it and edit with notepad. Or notepad++ which is better for sql files
Is there a way similar to removeItemAtPath: that allows removing of a few files at once? It should not all the files in a directory but can be a few of them only. E.g. you feed the method a few file paths in an array.
Create a collection of the items you wish to delete, loop over the collection and delete them the same way you'd delete a single file.
I want to open some file from my application, file are created by the application itself and can have read or write permission.
I set read permission file with:
chmod 400 path
I want read permission file don't show unlock dialog when the user try to edit such files.
Is there any FS flags that can help me?
I just notice that if I try to change the owner of the file, the annoying dialog disappear, and the user can just duplicate the file in another place. This is exactly what I'm looking for but, is this the correct way to block a file?
Here 2 images about the involved dialogs
If the file only have read permissions, then it must be that the file system will ask for a password if the owner (or someoneelse) tries to change the file. Normally, one cannot change the owner of a file to some other owner ; that would be a major security hole.
Maybe what you are looking for is the stationary flag ? This will force a user to duplicate the file to work with it, but reading it should be no problem. You get that easily in the finder from the info window for a given file.
This is not a standard unix flag but a hfs thing. You will have to set this using NSFileManager and the method
setAttributes:ofItemAtPath:error: