How to avoid AutoCAD DWG file being renamed and recreated during save? - filesystems

I edit DWG files on my virtual drive, created with Cloud Filter API. When I edit DWG file using AutoCAD, the file is being renamed and than recreated. Here is the sequence of operations in file system when I save a file in AutoCAD:
I tried several types of hydration policies (Full, Progressive and Partial) and some hydration policy modifiers (DehydrationAllowed, ValidationRequired and None) on sync root, but with no success.
I know that it is possible to avoid the file recreation, at least it is not recreated with SharePoint/OneDrive. AutoCAD somehow correctly detects OneDrive.
How do I avoid file being recreated during save operation?

If I understand, you want to prevent the rename of the current drawing to a ".bak" file and the creation of a new ".dwg" file when you save a file.
The simple answer is to set the AutoCAD system variable ISAVEBAK to 0 as indicated in this web page ISSAVEBAK System Variable.
However, as mentioned on this page, you could lose the drawing file if there were a glitch during the save process. Yes - it is possible to lose the whole file due to a glitch.
Be aware that this rename / create process is the standard operational process with AutoCAD. Unless specifically overridden, this happens during each save of every drawing.
Lastly, note that this setting is saved in the registry. As such, once set, if applies to the save of every drawing from that point forward - unless un-modified via an AutoCAD AutoLisp routine (such as those that run upon starting AutoCAD)

Related

How to sync files of local filesystem to upload using angularJS

Basically what it means is let's say I upload a file, and then I make some changes to the file, for example, a .txt file. The uploaded file automatically syncs itself with the original file in the local system, we don't have to upload it again. And this will be done either as soon as there is a change or after a fixed interval of time. Is it possible using javascript(angularjs)?
I guess we will need the path of the file that we want to sync and read the file repeatedly after a set interval of time. But browsers are not allowed to access the full path so I am not sure how to proceed with this. Any suggestions would be helpful.

NTFS Change Journal - File Change Tracking

I'm developing a change tracking software to monitor files of a specific volume. I tried FileSystemWatcher (.NET) and AlternateDataStreams but they all have some limitations (ie. the change tracking software has to be on 24/7, alternate data streams to not work for ReadOnly files, etc.).
After some investigations I thought that I could directly read the NTFS change journal. This works great if the file is moved/renamed, etc. on the same volume. For identifying the file I'm using the File Reference Number.
But if the file is moved to another volume, the File Reference Number naturally changes.
My question:
Is there a unique ID (GUID or something else) that doesn't change even if the file is moved to another volume?
Well...there can be a file GUID, but it's not there by default.
If you have the necessary permissions, you can race through the files and assign a GUID which will be preserved across NTFS volume moves. Your stated goal is exactly why the feature exists. It uses a somewhat unwieldy API called DeviceIOControl...which is used for a gazillion purposes...but one of it's control codes is FSCTL_CREATE_OR_GET_OBJECT_ID. Check here for details.
It only creates the GUID if one hasn't already been assigned...which is just how you want it to work. Of course, if the file moves to a non-NTFS volume, you're still outta luck.

Preventing batch file formats in GPO

Is it possible to disable AD users from saving a text file as a .bat format via GPO? If yes, how is it doable?
Thanks in advance
Since you didn't specific where you wanted to prevent the saving of files, I will give a general answer.
You can users prevent from saving files with a specific extension (file screening) on network shares using something called File Server Resource Manager.
You can prevent users from executing or running files having specific extensions through a GPO.
One cannot prevent a user from saving a file with a specific extension to their own workstation.
So, depending on the Microsoft technology you are using, and where the file is being saved, the overall answer is it depends.

Monitoring for changes in folder without continuously running

This question has been asked around several time. Many programs like Dropbox make use of some form of file system api interaction to instantaneously keep track of changes that take place within a monitored folder.
As far as my understanding goes, however, this requires some daemon to be online at all times to wait for callbacks from the file system api. However, I can shut Dropbox down, update files and folders, and when I launch it again it still gets to know what the changes that I did to my folder were. How is this possible? Does it exhaustively search the whole tree in search for updates?
Short answer is YES.
Let's use Google Drive as an example, since its local database is not encrypted, and it's easy to see what's going on.
Basically it keeps a snapshot of the Google Drive folder.
You can browse the snapshot.db (typically under %USER%\AppData\Local\Google\Drive\user_default) using DB browser for SQLite.
Here's a sample from my computer:
You see that it tracks (among other stuff):
Last write time (looks like Unix time).
checksum.
Size - in bytes.
Whenever Google Drive starts up, it queries all the files and folders that are under your "Google Drive" folder (you can see that using Procmon)
Note that changes can also sync down from the server
There's also Change Journals, but I don't think that Dropbox or GDrive use it:
To avoid these disadvantages, the NTFS file system maintains an update sequence number (USN) change journal. When any change is made to a file or directory in a volume, the USN change journal for that volume is updated with a description of the change and the name of the file or directory.

Read content of folder without AIR in AS3 (no flash.filesystem)

I'm working on a project and I need to dynamically check what is in onhe of my folder. The idea is that I have the id of a quest, and there is a folder name after that id. My code needs to check if this folder exist AND if there is something in it. After that, it show all the picture inside that folder. The goal is that I will just have to add picture in a folder to have them appear in my game.
I tried to find a way to check the content of my folder, but everyone say that I need flash.filesystem, BUT it means that I need to use AIR. AIR does NOT work in FireFox or any other browser.
Here is the website that make me understood that:
http://www.experts-exchange.com/Software/Photos_Graphics/Web_Graphics/Macromedia_Flash/Q_26118847.html
How can I explore the content of my folders then?
There is absolutely no way to explore the local file system without user interaction in Flash. If you want to do it, you must make an AIR application, which is not browser-based. This is a security feature that is imposed by each browser (you can't do it in JS either) and implemented identically by Adobe.
You can use FileReference to allow a user to select file(s) for Flash to have access to or save a file, but that is the most interaction with the filesystem that will be possible without opening AIR (which is also not limitless. Even with AIR, you won't have full access to the file system and will be locked out of certain directories and prevented from doing certain things)
If the folders are on your server you'll need to rely on a server side script to do the job and pass the result to your app.
If you mean folders on client side computer it's not gonna be possible for security reason.

Resources